File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed
tests/src/Functional/Update Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -184,10 +184,6 @@ function system_post_update_states_clear_cache() {
184184 */
185185function system_post_update_add_expand_all_items_key_in_system_menu_block (&$ sandbox = NULL ) {
186186 \Drupal::classResolver (ConfigEntityUpdater::class)->update ($ sandbox , 'block ' , function ($ block ) {
187- if (strpos ($ block ->getPluginId (), 'system_menu_block: ' ) === 0 ) {
188- $ block ->set ('settings.expand_all_items ' , FALSE );
189- return TRUE ;
190- }
191- return FALSE ;
187+ return strpos ($ block ->getPluginId (), 'system_menu_block: ' ) === 0 ;
192188 });
193189}
Original file line number Diff line number Diff line change @@ -32,7 +32,9 @@ protected function setDatabaseDumpFiles() {
3232 public function testPostUpdateMenuBlockFields () {
3333 $ this ->assertArrayNotHasKey ('expand_all_items ' , Block::load ('bartik_account_menu ' )->get ('settings ' ));
3434 $ this ->runUpdates ();
35- $ this ->assertArrayHasKey ('expand_all_items ' , Block::load ('bartik_account_menu ' )->get ('settings ' ));
35+ $ settings = Block::load ('bartik_account_menu ' )->get ('settings ' );
36+ $ this ->assertArrayHasKey ('expand_all_items ' , $ settings );
37+ $ this ->assertFalse ($ settings ['expand_all_items ' ]);
3638 }
3739
3840}
You can’t perform that action at this time.
0 commit comments