You are here

protected function NodeConditionTest::setUp in Drupal 9

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

Overrides EntityKernelTestBase::setUp

File

core/modules/node/tests/src/Kernel/NodeConditionTest.php, line 19

Class

NodeConditionTest
Tests that conditions, provided by the node module, are working properly.

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();
  $type = NodeType::create([
    'type' => 'article',
    'name' => 'article',
  ]);
  $type
    ->save();
  $type = NodeType::create([
    'type' => 'test',
    'name' => 'test',
  ]);
  $type
    ->save();
}