function NodeTokenReplaceTest::setUp

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

Overrides TokenReplaceKernelTestBase::setUp

File

core/modules/node/tests/src/Kernel/NodeTokenReplaceTest.php, line 29

Class

NodeTokenReplaceTest
Tests node token replacement.

Namespace

Drupal\Tests\node\Kernel

Code

protected function setUp() : void {
    parent::setUp();
    $this->installConfig([
        'filter',
        'node',
    ]);
    $node_type = NodeType::create([
        'type' => 'article',
        'name' => 'Article',
    ]);
    $node_type->save();
    node_add_body_field($node_type);
}

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