コード例 #1
0
ファイル: AjaxCommandsTest.php プロジェクト: ddrozdik/dmaps
 /**
  * @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());
 }
コード例 #2
0
 /**
  * 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.");
 }