public function ConfigEntityTypeTest::testConfigPrefixLengthValid in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityTypeTest.php \Drupal\Tests\Core\Config\Entity\ConfigEntityTypeTest::testConfigPrefixLengthValid()
Tests that a valid config prefix returned by getConfigPrefix() does not throw an exception and is formatted as expected.
@covers ::getConfigPrefix
File
- core/
tests/ Drupal/ Tests/ Core/ Config/ Entity/ ConfigEntityTypeTest.php, line 63 - Contains \Drupal\Tests\Core\Config\Entity\ConfigEntityTypeTest.
Class
- ConfigEntityTypeTest
- @coversDefaultClass \Drupal\Core\Config\Entity\ConfigEntityType @group Config
Namespace
Drupal\Tests\Core\Config\EntityCode
public function testConfigPrefixLengthValid() {
// A provider length of 24 and config_prefix length of 58 (+1 for the .)
// results in a config length of 83, which is right at the limit.
$definition = array(
'provider' => $this
->randomMachineName(24),
'config_prefix' => $this
->randomMachineName(58),
);
$config_entity = $this
->setUpConfigEntityType($definition);
$expected_prefix = $definition['provider'] . '.' . $definition['config_prefix'];
$this
->assertEquals($expected_prefix, $config_entity
->getConfigPrefix());
}