You are here

function ViewsAccessTest::testAccessPerm in Views (for Drupal 7) 7.3

Tests perm access plugin.

File

tests/views_access.test, line 74
Definition of ViewsAccessTest.

Class

ViewsAccessTest
Basic test for pluggable access.

Code

function testAccessPerm() {
  $view = $this
    ->view_access_perm();
  $view
    ->set_display('default');
  $access_plugin = $view->display_handler
    ->get_plugin('access');
  $this
    ->assertTrue($view->display_handler
    ->access($this->admin_user), t('Admin-Account should be able to access the view everytime'));
  $this
    ->assertFalse($view->display_handler
    ->access($this->web_user));
  $this
    ->assertTrue($view->display_handler
    ->access($this->normal_user));
}