diff --git a/core/modules/block/lib/Drupal/block/Tests/BlockHiddenRegionTest.php b/core/modules/block/lib/Drupal/block/Tests/BlockHiddenRegionTest.php index 1232420..710c53f 100644 --- a/core/modules/block/lib/Drupal/block/Tests/BlockHiddenRegionTest.php +++ b/core/modules/block/lib/Drupal/block/Tests/BlockHiddenRegionTest.php @@ -64,6 +64,7 @@ public function testBlockNotInHiddenRegion() { config('system.theme') ->set('default', $theme) ->save(); + \Drupal::service('router.builder')->rebuild(); menu_router_rebuild(); // Ensure that "block_test_theme" is set as the default theme. diff --git a/core/modules/color/lib/Drupal/color/Tests/ColorTest.php b/core/modules/color/lib/Drupal/color/Tests/ColorTest.php index 1a02f25..577a3be 100644 --- a/core/modules/color/lib/Drupal/color/Tests/ColorTest.php +++ b/core/modules/color/lib/Drupal/color/Tests/ColorTest.php @@ -48,7 +48,8 @@ function setUp() { ), ); theme_enable(array_keys($this->themes)); - drupal_flush_all_caches(); + \Drupal::service('router.builder')->rebuild(); + menu_router_rebuild(); // Array filled with valid and not valid color values $this->colorTests = array( diff --git a/core/modules/system/lib/Drupal/system/Tests/Menu/MenuRouterTest.php b/core/modules/system/lib/Drupal/system/Tests/Menu/MenuRouterTest.php index 3b666a0..e9bb6e5 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Menu/MenuRouterTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Menu/MenuRouterTest.php @@ -338,6 +338,7 @@ function testMenuName() { // Change the menu_name parameter in menu_test.module, then force a menu // rebuild. menu_test_menu_name('changed'); + \Drupal::service('router.builder')->rebuild(); menu_router_rebuild(); $menu_links = entity_load_multiple_by_properties('menu_link', array('router_path' => 'menu_name_test'));