function NodeFieldOverridesTest::setUp

Same name in other branches
  1. 9 core/modules/node/tests/src/Kernel/NodeFieldOverridesTest.php \Drupal\Tests\node\Kernel\NodeFieldOverridesTest::setUp()
  2. 8.9.x core/modules/node/tests/src/Kernel/NodeFieldOverridesTest.php \Drupal\Tests\node\Kernel\NodeFieldOverridesTest::setUp()
  3. 10 core/modules/node/tests/src/Kernel/NodeFieldOverridesTest.php \Drupal\Tests\node\Kernel\NodeFieldOverridesTest::setUp()

Overrides EntityKernelTestBase::setUp

File

core/modules/node/tests/src/Kernel/NodeFieldOverridesTest.php, line 35

Class

NodeFieldOverridesTest
Tests node field overrides.

Namespace

Drupal\Tests\node\Kernel

Code

protected function setUp() : void {
    parent::setUp();
    $this->installConfig([
        'user',
    ]);
    $this->user = $this->createUser();
    \Drupal::service('current_user')->setAccount($this->user);
}

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