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