Unverified Commit 48eb1055 authored by alexpott's avatar alexpott

Issue #3020718 by jibran, Sam152:...

Issue #3020718 by jibran, Sam152: system_post_update_add_expand_all_items_key_in_system_menu_block fails if blocks module is disabled
parent 60574dd0
......@@ -183,6 +183,9 @@ function system_post_update_states_clear_cache() {
* Initialize 'expand_all_items' values to system_menu_block.
*/
function system_post_update_add_expand_all_items_key_in_system_menu_block(&$sandbox = NULL) {
if (!\Drupal::moduleHandler()->moduleExists('block')) {
return;
}
\Drupal::classResolver(ConfigEntityUpdater::class)->update($sandbox, 'block', function ($block) {
return strpos($block->getPluginId(), 'system_menu_block:') === 0;
});
......
<?php
namespace Drupal\Tests\system\Functional\Update;
use Drupal\FunctionalTests\Update\UpdatePathTestBase;
/**
* Test the system module updates with no dependencies installed.
*
* @group Update
* @group legacy
*/
class NoDependenciesUpdateTest extends UpdatePathTestBase {
/**
* {@inheritdoc}
*/
protected $installProfile = 'testing';
/**
* {@inheritdoc}
*/
protected function setDatabaseDumpFiles() {
$this->databaseDumpFiles = [
__DIR__ . '/../../../../tests/fixtures/update/drupal-8.6.0.bare.testing.php.gz',
];
}
/**
* Test the system module updates with no dependencies installed.
*/
public function testNoDependenciesUpdate() {
$this->runUpdates();
}
}
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