diff -u b/core/modules/system/src/Tests/Theme/ThemeTest.php b/core/modules/system/src/Tests/Theme/ThemeTest.php --- b/core/modules/system/src/Tests/Theme/ThemeTest.php +++ b/core/modules/system/src/Tests/Theme/ThemeTest.php @@ -295,11 +295,14 @@ * when needed. */ function testSuggestionPreprocessForDefaults() { + $this->config('system.theme') + ->set('default', 'test_theme') + ->save(); // Test with both an unprimed and primed theme registry. drupal_theme_rebuild(); for ($i = 0; $i < 2; $i++) { $this->drupalGet('theme-test/preprocess-suggestions'); - $this->assertText('Theme hook implementor=test_theme_theme_test_preprocess__suggestion(). Foo=template_preprocess_theme_test_preprocess', 'Theme hook ran with data available from a preprocess function for the suggested hook.'); + $this->assertText('Theme hook implementor=test_theme_preprocess_theme_test_preprocess_suggestions__suggestion(). ', 'Theme hook ran with data available from a preprocess function for the suggested hook.'); } } } only in patch2: unchanged: --- a/core/modules/system/src/Tests/Theme/RegistryTest.php +++ b/core/modules/system/src/Tests/Theme/RegistryTest.php @@ -75,42 +75,6 @@ function testRaceCondition() { } /** - * Tests the theme registry with multiple subthemes. - */ - public function testMultipleSubThemes() { - $theme_handler = \Drupal::service('theme_handler'); - $theme_handler->install(['test_basetheme', 'test_subtheme', 'test_subsubtheme']); - - $registry_subsub_theme = new Registry(\Drupal::root(), \Drupal::cache(), \Drupal::lock(), \Drupal::moduleHandler(), $theme_handler, \Drupal::service('theme.initialization'), 'test_subsubtheme'); - $registry_subsub_theme->setThemeManager(\Drupal::theme()); - $registry_sub_theme = new Registry(\Drupal::root(), \Drupal::cache(), \Drupal::lock(), \Drupal::moduleHandler(), $theme_handler, \Drupal::service('theme.initialization'), 'test_subtheme'); - $registry_sub_theme->setThemeManager(\Drupal::theme()); - $registry_base_theme = new Registry(\Drupal::root(), \Drupal::cache(), \Drupal::lock(), \Drupal::moduleHandler(), $theme_handler, \Drupal::service('theme.initialization'), 'test_basetheme'); - $registry_base_theme->setThemeManager(\Drupal::theme()); - - $preprocess_functions = $registry_subsub_theme->get()['theme_test_template_test']['preprocess functions']; - $this->assertIdentical([ - 'template_preprocess', - 'test_basetheme_preprocess_theme_test_template_test', - 'test_subtheme_preprocess_theme_test_template_test', - 'test_subsubtheme_preprocess_theme_test_template_test', - ], $preprocess_functions); - - $preprocess_functions = $registry_sub_theme->get()['theme_test_template_test']['preprocess functions']; - $this->assertIdentical([ - 'template_preprocess', - 'test_basetheme_preprocess_theme_test_template_test', - 'test_subtheme_preprocess_theme_test_template_test', - ], $preprocess_functions); - - $preprocess_functions = $registry_base_theme->get()['theme_test_template_test']['preprocess functions']; - $this->assertIdentical([ - 'template_preprocess', - 'test_basetheme_preprocess_theme_test_template_test', - ], $preprocess_functions); - } - - /** * Tests that the theme registry can be altered by themes. */ public function testThemeRegistryAlterByTheme() {