$expected_prefix =
$definition['provider'
] . '.' .
$definition['config_prefix'
];
$this->
assertEquals($expected_prefix,
$config_entity->
getConfigPrefix());
} /**
* @covers ::__construct
*/
public function testConstruct() { $config_entity =
new ConfigEntityType([ 'id' => 'example_config_entity_type',
]);
$this->
assertEquals('Drupal\Core\Config\Entity\ConfigEntityStorage',
$config_entity->
getStorageClass());
} /**
* @covers ::__construct
*/
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'
],
]);