1 views_view.test ViewsViewTest::testDestroy()

Tests the deconstructor to be sure that every kind of heavy objects are removed.

File

core/modules/views/tests/views_view.test, line 16
Definition of ViewsViewTest.

Class

ViewsViewTest
Views class tests.

Code

function testDestroy() {
  $view = $this->view_test_destroy();

  $view->preview();
  $view->destroy();

  $this->assertViewDestroy($view);

  // Manipulate the display variable to test a previous bug.
  $view = $this->view_test_destroy();
  $view->preview();

  $view->destroy();
  $this->assertViewDestroy($view);
}