function AjaxCommandsUnitTest::testRestripeCommand

Tests that RestripeCommand objects can be constructed and rendered.

File

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

Class

AjaxCommandsUnitTest
Tests for all AJAX Commands.

Namespace

Drupal\system\Tests\Ajax

Code

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