function AccessPermissionTest::setUp

Same name and namespace in other branches
  1. 9 core/modules/user/tests/src/Kernel/Views/AccessPermissionTest.php \Drupal\Tests\user\Kernel\Views\AccessPermissionTest::setUp()
  2. 10 core/modules/user/tests/src/Kernel/Views/AccessPermissionTest.php \Drupal\Tests\user\Kernel\Views\AccessPermissionTest::setUp()
  3. 11.x core/modules/user/tests/src/Kernel/Views/AccessPermissionTest.php \Drupal\Tests\user\Kernel\Views\AccessPermissionTest::setUp()

Overrides KernelTestBase::setUp

File

core/modules/user/tests/src/Kernel/Views/AccessPermissionTest.php, line 56

Class

AccessPermissionTest
Tests views perm access plugin.

Namespace

Drupal\Tests\user\Kernel\Views

Code

protected function setUp() {
    parent::setUp();
    $this->installSchema('system', [
        'sequences',
    ]);
    $this->installEntitySchema('user');
    $this->installEntitySchema('node');
    // Create first UID1 so, the other users are not super-admin.
    $this->createUser([], NULL, FALSE, [
        'uid' => 1,
    ]);
    $this->webUser = $this->createUser();
    $this->normalUser = $this->createUser([
        'views_test_data test permission',
    ]);
    ViewTestData::createTestViews(get_class($this), [
        'user_test_views',
    ]);
}

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