private function RabbitHoleBehaviorPluginTest::createTestEntity in Rabbit Hole 2.x
Same name and namespace in other branches
- 8 tests/src/Functional/RabbitHoleBehaviorPluginTest.php \Drupal\Tests\rabbit_hole\Functional\RabbitHoleBehaviorPluginTest::createTestEntity()
Create an entity for testing.
Return value
\Drupal\node\NodeInterface Created node.
Throws
\Drupal\Core\Entity\EntityStorageException
1 call to RabbitHoleBehaviorPluginTest::createTestEntity()
- RabbitHoleBehaviorPluginTest::setUp in tests/
src/ Functional/ RabbitHoleBehaviorPluginTest.php
File
- tests/
src/ Functional/ RabbitHoleBehaviorPluginTest.php, line 168
Class
- RabbitHoleBehaviorPluginTest
- Test the functionality of the RabbitHoleBehavior plugin.
Namespace
Drupal\Tests\rabbit_hole\FunctionalCode
private function createTestEntity() {
$node = Node::create([
'nid' => NULL,
'type' => self::TEST_CONTENT_TYPE_ID,
'title' => 'Test Behavior Settings Node',
]);
$node
->save();
return $node;
}