Ejemplo n.º 1
0
 /**
  * @covers \Drupal\Core\Ajax\SetDialogOptionCommand
  */
 public function testSetDialogOptionCommand()
 {
     $command = new SetDialogOptionCommand('#some-dialog', 'width', '500');
     $expected = array('command' => 'setDialogOption', 'selector' => '#some-dialog', 'optionName' => 'width', 'optionValue' => '500');
     $this->assertEquals($expected, $command->render());
 }
 /**
  * Tests that SetDialogOptionCommand objects can be constructed and rendered.
  */
 public function testSetDialogOptionCommand()
 {
     $command = new SetDialogOptionCommand('#some-dialog', 'width', '500');
     $expected = array('command' => 'setDialogOption', 'selector' => '#some-dialog', 'optionName' => 'width', 'optionValue' => '500');
     $this->assertEquals($command->render(), $expected, "SetDialogOptionCommand::render() with a selector didn't return the expected array.");
 }