function ConfigEntityTypeTest::testConstructBadStorage
@covers ::__construct
File
-
core/
tests/ Drupal/ Tests/ Core/ Config/ Entity/ ConfigEntityTypeTest.php, line 105
Class
- ConfigEntityTypeTest
- @coversDefaultClass \Drupal\Core\Config\Entity\ConfigEntityType[[api-linebreak]] @group Config
Namespace
Drupal\Tests\Core\Config\EntityCode
public function testConstructBadStorage() {
$this->expectException(ConfigEntityStorageClassException::class);
$this->expectExceptionMessage('\\Drupal\\Core\\Entity\\KeyValueStore\\KeyValueEntityStorage is not \\Drupal\\Core\\Config\\Entity\\ConfigEntityStorage or it does not extend it');
new ConfigEntityType([
'id' => 'example_config_entity_type',
'handlers' => [
'storage' => '\\Drupal\\Core\\Entity\\KeyValueStore\\KeyValueEntityStorage',
],
]);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.