1 views_view.test | ViewsViewTest::assertViewDestroy($view) |
File
- core/
modules/ views/ tests/ views_view.test, line 32 - Definition of ViewsViewTest.
Class
- ViewsViewTest
- Views class tests.
Code
function assertViewDestroy($view) {
$this->assertFalse(isset($view->display['default']->handler), 'Make sure all displays are destroyed.');
$this->assertFalse(isset($view->display['attachment_1']->handler), 'Make sure all displays are destroyed.');
$this->assertFalse(isset($view->filter), 'Make sure all handlers are destroyed');
$this->assertFalse(isset($view->field), 'Make sure all handlers are destroyed');
$this->assertFalse(isset($view->argument), 'Make sure all handlers are destroyed');
$this->assertFalse(isset($view->relationship), 'Make sure all handlers are destroyed');
$this->assertFalse(isset($view->sort), 'Make sure all handlers are destroyed');
$this->assertFalse(isset($view->area), 'Make sure all handlers are destroyed');
$keys = array('current_display', 'display_handler', 'field', 'argument', 'filter', 'sort', 'relationship', 'header', 'footer', 'empty', 'query', 'result', 'inited', 'style_plugin', 'plugin_name', 'exposed_data', 'exposed_input', 'many_to_one_tables');
foreach ($keys as $key) {
$this->assertFalse(isset($view->{$key}), $key);
}
$this->assertEqual($view->built, FALSE);
$this->assertEqual($view->executed, FALSE);
$this->assertEqual($view->build_info, array());
$this->assertEqual($view->attachment_before, '');
$this->assertEqual($view->attachment_after, '');
}