You are here

protected function NodeValidationTest::setUp in Drupal 8

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

Set the default field storage backend for fields created during tests.

Overrides EntityKernelTestBase::setUp

File

core/modules/node/tests/src/Kernel/NodeValidationTest.php, line 26

Class

NodeValidationTest
Tests node validation constraints.

Namespace

Drupal\Tests\node\Kernel

Code

protected function setUp() {
  parent::setUp();

  // Create a node type for testing.
  $type = NodeType::create([
    'type' => 'page',
    'name' => 'page',
  ]);
  $type
    ->save();
}