You are here

public function ViewExecutableTest::testDestroy in Drupal 9

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

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

File

core/modules/views/tests/src/Kernel/ViewExecutableTest.php, line 351

Class

ViewExecutableTest
Tests the ViewExecutable class.

Namespace

Drupal\Tests\views\Kernel

Code

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