function AccessTest::setUp

Overrides ViewTestBase::setUp

File

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

Class

AccessTest
Tests pluggable access for views.

Namespace

Drupal\Tests\views\Functional\Plugin

Code

protected function setUp($import_test_views = TRUE) {
  parent::setUp($import_test_views);
  $this->enableViewsTestModule();
  ViewTestData::createTestViews(get_class($this), [
    'views_test_data',
  ]);
  $this->webUser = $this->drupalCreateUser();
  $normal_role = $this->drupalCreateRole([]);
  $this->normalUser = $this->drupalCreateUser([
    'views_test_data test permission',
  ]);
  $this->normalUser
    ->addRole($normal_role);
  // @todo when all the plugin information is cached make a reset function and
  // call it here.
}

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