You are here

protected function ConfigEntityTypeTest::setUpConfigEntityType in Drupal 8

Same name and namespace in other branches
  1. 9 core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityTypeTest.php \Drupal\Tests\Core\Config\Entity\ConfigEntityTypeTest::setUpConfigEntityType()

Sets up a ConfigEntityType object for a given set of values.

Parameters

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

Return value

\Drupal\Core\Config\Entity\ConfigEntityTypeInterface

5 calls to ConfigEntityTypeTest::setUpConfigEntityType()
ConfigEntityTypeTest::testConfigPrefixLengthExceeds in core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityTypeTest.php
Tests that we get an exception when the length of the config prefix that is returned by getConfigPrefix() exceeds the maximum defined prefix length.
ConfigEntityTypeTest::testConfigPrefixLengthValid in core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityTypeTest.php
Tests that a valid config prefix returned by getConfigPrefix() does not throw an exception and is formatted as expected.
ConfigEntityTypeTest::testGetConfigPrefix in core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityTypeTest.php
Tests the getConfigPrefix() method.
ConfigEntityTypeTest::testGetPropertiesToExport in core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityTypeTest.php
@covers ::getPropertiesToExport
ConfigEntityTypeTest::testSetStorageClass in core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityTypeTest.php
@covers ::setStorageClass

File

core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityTypeTest.php, line 42

Class

ConfigEntityTypeTest
@coversDefaultClass \Drupal\Core\Config\Entity\ConfigEntityType @group Config

Namespace

Drupal\Tests\Core\Config\Entity

Code

protected function setUpConfigEntityType($definition) {
  if (!isset($definition['id'])) {
    $definition += [
      'id' => 'example_config_entity_type',
    ];
  }
  return new ConfigEntityType($definition);
}