You are here

protected function EntityHierarchyMicrositeKernelTestBase::doCreateTestEntity in Entity Reference Hierarchy 3.x

Same name and namespace in other branches
  1. 8.2 modules/entity_hierarchy_microsite/tests/src/Kernel/EntityHierarchyMicrositeKernelTestBase.php \Drupal\Tests\entity_hierarchy_microsite\Kernel\EntityHierarchyMicrositeKernelTestBase::doCreateTestEntity()

Creates the test entity.

Parameters

array $values: Entity values.

Return value

\Drupal\Core\Entity\EntityInterface Created entity.

Overrides EntityHierarchyTestTrait::doCreateTestEntity

File

modules/entity_hierarchy_microsite/tests/src/Kernel/EntityHierarchyMicrositeKernelTestBase.php, line 61

Class

EntityHierarchyMicrositeKernelTestBase
Defines a base class for micro-site tests.

Namespace

Drupal\Tests\entity_hierarchy_microsite\Kernel

Code

protected function doCreateTestEntity(array $values) {
  $entity = Node::create([
    'type' => 'basic',
  ] + $values);
  return $entity;
}