function AjaxCommandsUnitTest::testRemoveCommand

Tests that RemoveCommand objects can be constructed and rendered.

File

drupal/core/modules/system/lib/Drupal/system/Tests/Ajax/AjaxCommandsUnitTest.php, line 250
Definition of Drupal\system\Tests\Ajax\AjaxCommandsUnitTest.

Class

AjaxCommandsUnitTest
Tests for all AJAX Commands.

Namespace

Drupal\system\Tests\Ajax

Code

function testRemoveCommand() {
  $command = new RemoveCommand('#page-title');
  $expected = array(
    'command' => 'remove',
    'selector' => '#page-title',
  );
  $this
    ->assertEqual($command
    ->render(), $expected, 'RemoveCommand::render() returns a proper array.');
}