You are here

protected function EntityTypeTest::setUpEntityType in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/tests/Drupal/Tests/Core/Entity/EntityTypeTest.php \Drupal\Tests\Core\Entity\EntityTypeTest::setUpEntityType()

Sets up an EntityType object for a given set of values.

Parameters

array $definition: An array of values to use for the EntityType.

Return value

\Drupal\Core\Entity\EntityTypeInterface

21 calls to EntityTypeTest::setUpEntityType()
EntityTypeTest::testConstraintMethods in core/tests/Drupal/Tests/Core/Entity/EntityTypeTest.php
Tests the constraint methods.
EntityTypeTest::testGet in core/tests/Drupal/Tests/Core/Entity/EntityTypeTest.php
@covers ::get
EntityTypeTest::testGetAccessControlClass in core/tests/Drupal/Tests/Core/Entity/EntityTypeTest.php
Tests the getAccessControlClass() method.
EntityTypeTest::testGetFormClass in core/tests/Drupal/Tests/Core/Entity/EntityTypeTest.php
Tests the getFormClass() method.
EntityTypeTest::testGetGroupLabel in core/tests/Drupal/Tests/Core/Entity/EntityTypeTest.php
@covers ::getGroupLabel

... See full list

File

core/tests/Drupal/Tests/Core/Entity/EntityTypeTest.php, line 30
Contains \Drupal\Tests\Core\Entity\EntityTypeTest.

Class

EntityTypeTest
@coversDefaultClass \Drupal\Core\Entity\EntityType @group Entity

Namespace

Drupal\Tests\Core\Entity

Code

protected function setUpEntityType($definition) {
  $definition += array(
    'id' => 'example_entity_type',
  );
  return new EntityType($definition);
}