function AccessTest::testAccessNone

Same name in other branches
  1. 9 core/modules/views/tests/src/Functional/Plugin/AccessTest.php \Drupal\Tests\views\Functional\Plugin\AccessTest::testAccessNone()
  2. 10 core/modules/views/tests/src/Functional/Plugin/AccessTest.php \Drupal\Tests\views\Functional\Plugin\AccessTest::testAccessNone()
  3. 11.x core/modules/views/tests/src/Functional/Plugin/AccessTest.php \Drupal\Tests\views\Functional\Plugin\AccessTest::testAccessNone()

Tests none access plugin.

File

core/modules/views/tests/src/Functional/Plugin/AccessTest.php, line 72

Class

AccessTest
Tests pluggable access for views.

Namespace

Drupal\Tests\views\Functional\Plugin

Code

public function testAccessNone() {
    $view = Views::getView('test_access_none');
    $view->setDisplay();
    $this->assertTrue($view->display_handler
        ->access($this->webUser));
    $this->assertTrue($view->display_handler
        ->access($this->normalUser));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.