X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fsystem%2Ftests%2Ffixtures%2Fupdate%2Fdrupal-8.update-test-block-disabled-2513534.php;fp=web%2Fcore%2Fmodules%2Fsystem%2Ftests%2Ffixtures%2Fupdate%2Fdrupal-8.update-test-block-disabled-2513534.php;h=fa394473d731f741e108fc2820994987fdbc4a11;hb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;hp=0000000000000000000000000000000000000000;hpb=57c063afa3f66b07c4bbddc2d6129a96d90f0aad;p=yaffs-website diff --git a/web/core/modules/system/tests/fixtures/update/drupal-8.update-test-block-disabled-2513534.php b/web/core/modules/system/tests/fixtures/update/drupal-8.update-test-block-disabled-2513534.php new file mode 100644 index 000000000..fa394473d --- /dev/null +++ b/web/core/modules/system/tests/fixtures/update/drupal-8.update-test-block-disabled-2513534.php @@ -0,0 +1,50 @@ +insert('config') + ->fields([ + 'collection', + 'name', + 'data', + ]) + ->values([ + 'collection' => '', + 'name' => 'block.block.' . $block_config['id'], + 'data' => serialize($block_config), + ]) + ->execute(); +} + +// Update the config entity query "index". +$existing_blocks = $connection->select('key_value') + ->fields('key_value', ['value']) + ->condition('collection', 'config.entity.key_store.block') + ->condition('name', 'theme:bartik') + ->execute() + ->fetchField(); +$existing_blocks = unserialize($existing_blocks); + +$connection->update('key_value') + ->fields([ + 'value' => serialize(array_merge($existing_blocks, ['block.block.testfor2513534', 'block.block.secondtestfor2513534'])) + ]) + ->condition('collection', 'config.entity.key_store.block') + ->condition('name', 'theme:bartik') + ->execute();