You are here

public function AccessTest::testAccessNone in Drupal 8

Same name and namespace 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()

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));
}