Beispiel #1
0
 /**
  * @covers \Drupal\Core\Ajax\CloseDialogCommand
  */
 public function testCloseDialogCommand()
 {
     $command = new CloseDialogCommand('#some-dialog', TRUE);
     $expected = array('command' => 'closeDialog', 'selector' => '#some-dialog', 'persist' => TRUE);
     $this->assertEquals($expected, $command->render());
 }
 /**
  * Tests that CloseDialogCommand objects can be constructed and rendered.
  */
 public function testCloseDialogCommand()
 {
     $command = new CloseDialogCommand('#some-dialog', TRUE);
     $expected = array('command' => 'closeDialog', 'selector' => '#some-dialog', 'persist' => TRUE);
     $this->assertEquals($command->render(), $expected, "CloseDialogCommand::render() with a selector and persistence enabled didn't return the expected array.");
 }