function UserTestBase::setUp

Same name in other branches
  1. 9 core/modules/user/tests/src/Functional/Views/UserTestBase.php \Drupal\Tests\user\Functional\Views\UserTestBase::setUp()
  2. 8.9.x core/modules/user/tests/src/Functional/Views/UserTestBase.php \Drupal\Tests\user\Functional\Views\UserTestBase::setUp()
  3. 11.x core/modules/user/tests/src/Functional/Views/UserTestBase.php \Drupal\Tests\user\Functional\Views\UserTestBase::setUp()

Overrides ViewTestBase::setUp

1 call to UserTestBase::setUp()
AccessTestBase::setUp in core/modules/user/tests/src/Functional/Views/AccessTestBase.php
Sets up the test.
1 method overrides UserTestBase::setUp()
AccessTestBase::setUp in core/modules/user/tests/src/Functional/Views/AccessTestBase.php
Sets up the test.

File

core/modules/user/tests/src/Functional/Views/UserTestBase.php, line 34

Class

UserTestBase

Namespace

Drupal\Tests\user\Functional\Views

Code

protected function setUp($import_test_views = TRUE, $modules = [
    'user_test_views',
]) : void {
    parent::setUp($import_test_views, $modules);
    $this->users[] = $this->drupalCreateUser();
    $this->users[] = User::load(1);
    $this->nodes[] = $this->drupalCreateNode([
        'uid' => $this->users[0]
            ->id(),
    ]);
    $this->nodes[] = $this->drupalCreateNode([
        'uid' => 1,
    ]);
}

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