Commit 6899a43d authored by webchick's avatar webchick

Issue #1839904 by disasm, tim.plunkett: Rename plugin.core.block CMI prefix to block.block.

parent a7e98179
......@@ -26,7 +26,7 @@
* form_controller_class = {
* "default" = "Drupal\block\BlockFormController"
* },
* config_prefix = "plugin.core.block",
* config_prefix = "block.block",
* fieldable = FALSE,
* entity_keys = {
* "id" = "id",
......
......@@ -86,7 +86,7 @@ protected function createTests() {
$this->assertTrue($entity instanceof Block, 'The newly created entity is a Block.');
// Verify all of the block properties.
$actual_properties = config('plugin.core.block.stark.test_block')->get();
$actual_properties = config('block.block.stark.test_block')->get();
$this->assertTrue(!empty($actual_properties['uuid']), 'The block UUID is set.');
unset($actual_properties['uuid']);
......@@ -177,14 +177,14 @@ protected function deleteTests() {
// Ensure that the storage isn't currently empty.
$config_storage = $this->container->get('config.storage');
$config = $config_storage->listAll('plugin.core.block.');
$config = $config_storage->listAll('block.block.');
$this->assertFalse(empty($config), 'There are blocks in config storage.');
// Delete the block.
$entity->delete();
// Ensure that the storage is now empty.
$config = $config_storage->listAll('plugin.core.block.');
$config = $config_storage->listAll('block.block.');
$this->assertTrue(empty($config), 'There are no blocks in config storage.');
}
......
......@@ -56,8 +56,8 @@ function testNewDefaultThemeBlocks() {
// Ensure that the new theme has all the blocks as the previous default.
// @todo Replace the string manipulation below once the configuration
// system provides a method for extracting an ID in a given namespace.
$default_prefix = "plugin.core.block.$default_theme";
$new_prefix = "plugin.core.block.$new_theme";
$default_prefix = "block.block.$default_theme";
$new_prefix = "block.block.$new_theme";
$default_block_names = config_get_storage_names_with_prefix($default_prefix);
$new_blocks = array_flip(config_get_storage_names_with_prefix($new_prefix));
$this->assertTrue(count($default_block_names) == count($new_blocks), 'The new default theme has the same number of blocks as the previous theme.');
......@@ -65,8 +65,8 @@ function testNewDefaultThemeBlocks() {
// Make sure the configuration object name is in the expected format.
if (strpos($default_block_name, $default_prefix) === 0) {
// Remove the matching block from the list of blocks in the new theme.
// E.g., if the old theme has plugin.core.block.stark.admin,
// unset plugin.core.block.bartik.admin.
// E.g., if the old theme has block.block.stark.admin,
// unset block.block.bartik.admin.
$id = substr($default_block_name, (strlen($default_prefix) + 1));
unset($new_blocks[$new_prefix . '.' . $id]);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment