function ConfigEntityTypeTest::setUpConfigEntityType

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()
  2. 10 core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityTypeTest.php \Drupal\Tests\Core\Config\Entity\ConfigEntityTypeTest::setUpConfigEntityType()
  3. 11.x 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 <a href="/api/drupal/core%21lib%21Drupal%21Core%21Config%21Entity%21ConfigEntityType.php/class/ConfigEntityType/8.9.x" title="Provides an implementation of a configuration entity type and its metadata." class="local">\Drupal\Core\Config\Entity\ConfigEntityType</a> @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);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.