protected function NodeValidationTest::setUp in Drupal 9
Same name and namespace in other branches
- 8 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();
}