You are here

protected function AccessTest::setUp in Drupal 10

Same name in this branch
  1. 10 core/modules/file/tests/src/Kernel/AccessTest.php \Drupal\Tests\file\Kernel\AccessTest::setUp()
  2. 10 core/modules/views/tests/src/Functional/Plugin/AccessTest.php \Drupal\Tests\views\Functional\Plugin\AccessTest::setUp()
Same name and namespace in other branches
  1. 8 core/modules/views/tests/src/Functional/Plugin/AccessTest.php \Drupal\Tests\views\Functional\Plugin\AccessTest::setUp()
  2. 9 core/modules/views/tests/src/Functional/Plugin/AccessTest.php \Drupal\Tests\views\Functional\Plugin\AccessTest::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, $modules = [
  'views_test_config',
]) : void {
  parent::setUp($import_test_views, $modules);
  $this
    ->enableViewsTestModule();
  ViewTestData::createTestViews(static::class, [
    '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.
}