You are here

protected function NodeConditionTest::setUp in Drupal 8

Same name and namespace in other branches
  1. 9 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 18

Class

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

Namespace

Drupal\Tests\node\Kernel

Code

protected function setUp() {
  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();
}