protected function ViewsRevisionableIntegrationTest::doCreateChildTestEntity in Entity Reference Hierarchy 3.x
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/ ViewsRevisionableIntegrationTest.php, line 74
Class
- ViewsRevisionableIntegrationTest
- Defines a class for testing views integration with revisionable entities.
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);
}