You are here

protected function AccessTest::setUp in Drupal 8

Same name in this branch
  1. 8 core/modules/file/tests/src/Kernel/AccessTest.php \Drupal\Tests\file\Kernel\AccessTest::setUp()
  2. 8 core/modules/views/tests/src/Functional/Plugin/AccessTest.php \Drupal\Tests\views\Functional\Plugin\AccessTest::setUp()
Same name and namespace in other branches
  1. 9 core/modules/views/tests/src/Functional/Plugin/AccessTest.php \Drupal\Tests\views\Functional\Plugin\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.
}