You are here

public function ViewExecutableTest::testDestroy in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/modules/views/src/Tests/ViewExecutableTest.php \Drupal\views\Tests\ViewExecutableTest::testDestroy()

Tests the deconstructor to be sure that necessary objects are removed.

File

core/modules/views/src/Tests/ViewExecutableTest.php, line 336
Contains \Drupal\views\Tests\ViewExecutableTest.

Class

ViewExecutableTest
Tests the ViewExecutable class.

Namespace

Drupal\views\Tests

Code

public function testDestroy() {
  $view = Views::getView('test_destroy');
  $view
    ->preview();
  $view
    ->destroy();
  $this
    ->assertViewDestroy($view);
}