protected function HierarchyNestedSetRevisionIntegrationTest::doCreateChildTestEntity in Entity Reference Hierarchy 8.2
Same name and namespace in other branches
- 3.x tests/src/Kernel/HierarchyNestedSetRevisionIntegrationTest.php \Drupal\Tests\entity_hierarchy\Kernel\HierarchyNestedSetRevisionIntegrationTest::doCreateChildTestEntity()
Creates a new test entity.
Parameters
int|null $parentId: Parent ID.
string $label: Entity label.
int $weight: Entity weight amongst sibling, if parent is set.
Return value
\Drupal\Core\Entity\EntityInterface New entity.
Overrides EntityHierarchyTestTrait::doCreateChildTestEntity
File
- tests/
src/ Kernel/ HierarchyNestedSetRevisionIntegrationTest.php, line 61
Class
- HierarchyNestedSetRevisionIntegrationTest
- Tests integration with entity_hierarchy and a revisionable entity.
Namespace
Drupal\Tests\entity_hierarchy\KernelCode
protected function doCreateChildTestEntity($parentId, $label, $weight) {
// Don't want revisions here so pass FALSE for last argument.
return $this
->createTestEntity($parentId, $label, $weight, FALSE);
}