function NodeOwnerTest::setUp

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

Overrides EntityKernelTestBase::setUp

File

core/modules/node/tests/src/Kernel/NodeOwnerTest.php, line 28

Class

NodeOwnerTest
Tests node owner functionality.

Namespace

Drupal\Tests\node\Kernel

Code

protected function setUp() : void {
    parent::setUp();
    // Create the node bundles required for testing.
    $type = NodeType::create([
        'type' => 'page',
        'name' => 'page',
    ]);
    $type->save();
    // Enable two additional languages.
    ConfigurableLanguage::createFromLangcode('de')->save();
    ConfigurableLanguage::createFromLangcode('it')->save();
    $this->installSchema('node', 'node_access');
}

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