function NodeValidationTest::setUp
Same name in other branches
- 9 core/modules/node/tests/src/Kernel/NodeValidationTest.php \Drupal\Tests\node\Kernel\NodeValidationTest::setUp()
- 8.9.x core/modules/node/tests/src/Kernel/NodeValidationTest.php \Drupal\Tests\node\Kernel\NodeValidationTest::setUp()
- 10 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\KernelCode
protected function setUp() : void {
parent::setUp();
// Create a node type for testing.
$type = NodeType::create([
'type' => 'page',
'name' => 'page',
]);
$type->save();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.