You are here

protected function EckEntityTest::createEckEntity in Entity Construction Kit (ECK) 8

Creates ECK entity.

1 call to EckEntityTest::createEckEntity()
EckEntityTest::testEckMethods in tests/src/Kernel/EckEntityTest.php
Tests some of the ECK entity methods.

File

tests/src/Kernel/EckEntityTest.php, line 52

Class

EckEntityTest
Tests the ECK entity class.

Namespace

Drupal\Tests\eck\Kernel

Code

protected function createEckEntity(EckEntityType $entity_type, $values = []) {
  $values = [
    'entity_type' => $entity_type
      ->id(),
    'type' => $entity_type
      ->id(),
  ] + $values;
  $entity = EckEntity::create($values);
  return $entity;
}