Tests that OpenDialogCommand objects can be constructed and rendered.
function testOpenDialogCommand() {
$command = new OpenDialogCommand('#some-dialog', 'Title', '<p>Text!</p>', array(
'url' => FALSE,
'width' => 500,
));
$expected = array(
'command' => 'openDialog',
'selector' => '#some-dialog',
'settings' => NULL,
'data' => '<p>Text!</p>',
'dialogOptions' => array(
'url' => FALSE,
'width' => 500,
'title' => 'Title',
'modal' => FALSE,
),
);
$this
->assertEqual($command
->render(), $expected, 'OpenDialogCommand::render() returns a proper array.');
}