function ViewsAccessTest::getMissingAccessPluginTestView

Generates a view with an access plugin that doesn't exist.

1 call to ViewsAccessTest::getMissingAccessPluginTestView()
ViewsAccessTest::testMissingAccessPlugin in tests/views_access.test
Tests access for a view with a missing access plugin.

File

tests/views_access.test, line 333

Class

ViewsAccessTest
Basic test for pluggable access.

Code

protected function getMissingAccessPluginTestView() {
    $view = new view();
    $view->name = 'test_access_missing';
    $view->description = '';
    $view->tag = '';
    $view->view_php = '';
    $view->base_table = 'node';
    $view->is_cacheable = FALSE;
    $view->api_version = 2;
    $view->disabled = FALSE;
    
    /* Edit this to true to make a default view disabled initially */
    
    /* Display: Master */
    $handler = $view->new_display('default', 'Master', 'default');
    $handler->display->display_options['access']['type'] = 'does_not_exist';
    $handler->display->display_options['cache']['type'] = 'none';
    $handler->display->display_options['exposed_form']['type'] = 'basic';
    $handler->display->display_options['pager']['type'] = 'full';
    $handler->display->display_options['style_plugin'] = 'default';
    $handler->display->display_options['row_plugin'] = 'fields';
    $handler = $view->new_display('page', 'Page', 'page_1');
    $handler->display->display_options['path'] = 'test_access_missing';
    return $view;
}