Issue #3020718 by jibran, Sam152: system_post_update_add_expand_all_items_key_in_system_menu_block fails if blocks module is disabled
parent
60574dd038
commit
48eb10555f
|
@ -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;
|
||||
});
|
||||
|
|
Binary file not shown.
|
@ -0,0 +1,36 @@
|
|||
<?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();
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue