You are here

protected function HierarchyNestedSetRevisionIntegrationTest::doCreateChildTestEntity in Entity Reference Hierarchy 3.x

Same name and namespace in other branches
  1. 8.2 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\Kernel

Code

protected function doCreateChildTestEntity($parentId, $label, $weight) {

  // Don't want revisions here so pass FALSE for last argument.
  return $this
    ->createTestEntity($parentId, $label, $weight, FALSE);
}