private function RabbitHoleBehaviorPluginTest::createTestContentType in Rabbit Hole 8
Same name and namespace in other branches
- 2.x tests/src/Functional/RabbitHoleBehaviorPluginTest.php \Drupal\Tests\rabbit_hole\Functional\RabbitHoleBehaviorPluginTest::createTestContentType()
Create a content type for testing.
Return value
\Drupal\node\NodeTypeInterface Content type entity.
Throws
\Drupal\Core\Entity\EntityStorageException
1 call to RabbitHoleBehaviorPluginTest::createTestContentType()
- RabbitHoleBehaviorPluginTest::setUp in tests/
src/ Functional/ RabbitHoleBehaviorPluginTest.php
File
- tests/
src/ Functional/ RabbitHoleBehaviorPluginTest.php, line 148
Class
- RabbitHoleBehaviorPluginTest
- Test the functionality of the RabbitHoleBehavior plugin.
Namespace
Drupal\Tests\rabbit_hole\FunctionalCode
private function createTestContentType() {
$node_type = NodeType::create([
'type' => self::TEST_CONTENT_TYPE_ID,
'name' => self::TEST_CONTENT_TYPE_ID,
]);
$node_type
->save();
return $node_type;
}