public function ViewExecutableTest::testDestroy

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

File

drupal/core/modules/views/lib/Drupal/views/Tests/ViewExecutableTest.php, line 301
Contains \Drupal\views\Tests\ViewExecutableTest.

Class

ViewExecutableTest
Tests the ViewExecutable class.

Namespace

Drupal\views\Tests

Code

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