You are here

function ViewsViewTest::testDestroy in Views (for Drupal 7) 7.3

Ensure that every kind of heavy objects are removed by the destructor.

File

tests/views_view.test, line 27
Views class tests.

Class

ViewsViewTest

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);
}