function ViewsViewTest::testDelete

3.x views_view.test ViewsViewTest::testDelete()

File

tests/views_view.test, line 61
Definition of ViewsViewTest.

Class

ViewsViewTest
Views class tests.

Code

function testDelete() {
  // Delete a database view
  $view = $this->view_test_delete();
  $view->save();
  $view = views_get_view($view->name);
  $view->delete();

  $view = views_get_view($view->name);
  $this->assertNotNull($view, 'Make sure that the old view is still in the static cache.');

  $view = views_get_view($view->name, TRUE);
  $this->assertNull($view, "Make sure that the old view gets cleared by the reset parameter.");
}