function ConditionTestDualUserTest::setUp

Same name in other branches
  1. 9 core/tests/Drupal/KernelTests/Core/Plugin/Condition/ConditionTestDualUserTest.php \Drupal\KernelTests\Core\Plugin\Condition\ConditionTestDualUserTest::setUp()
  2. 8.9.x core/tests/Drupal/KernelTests/Core/Plugin/Condition/ConditionTestDualUserTest.php \Drupal\KernelTests\Core\Plugin\Condition\ConditionTestDualUserTest::setUp()
  3. 11.x core/tests/Drupal/KernelTests/Core/Plugin/Condition/ConditionTestDualUserTest.php \Drupal\KernelTests\Core\Plugin\Condition\ConditionTestDualUserTest::setUp()

Overrides KernelTestBase::setUp

File

core/tests/Drupal/KernelTests/Core/Plugin/Condition/ConditionTestDualUserTest.php, line 40

Class

ConditionTestDualUserTest
Tests a condition that requires two users.

Namespace

Drupal\KernelTests\Core\Plugin\Condition

Code

protected function setUp() : void {
    parent::setUp();
    $this->installEntitySchema('user');
    $this->anonymous = User::create([
        'uid' => 0,
    ]);
    $this->authenticated = User::create([
        'uid' => 1,
    ]);
}

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