public function PreviewTest::testPreviewController

Tests the actual preview response.

File

drupal/core/modules/views_ui/lib/Drupal/views_ui/Tests/PreviewTest.php, line 85
Contains \Drupal\views_ui\Tests\PreviewTest.

Class

PreviewTest
Tests the preview form in the UI.

Namespace

Drupal\views_ui\Tests

Code

public function testPreviewController() {
  $result = $this
    ->drupalGetAJAX('admin/structure/views/view/test_preview/preview/default');
  $result_commands = array();

  // Build a list of the result commands keyed by the js command.
  foreach ($result as $command) {
    $result_commands[$command['command']] = $command;
  }
  $this
    ->assertTrue(isset($result_commands['insert']));
}