You are here

protected function NodeTokenReplaceTest::setUp in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/node/tests/src/Kernel/NodeTokenReplaceTest.php \Drupal\Tests\node\Kernel\NodeTokenReplaceTest::setUp()
  2. 9 core/modules/node/tests/src/Kernel/NodeTokenReplaceTest.php \Drupal\Tests\node\Kernel\NodeTokenReplaceTest::setUp()

File

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

Class

NodeTokenReplaceTest
Generates text using placeholders for dummy content to check 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);
}