diff -u b/core/modules/color/src/Tests/ColorSafePreviewTest.php b/core/modules/color/src/Tests/ColorSafePreviewTest.php --- b/core/modules/color/src/Tests/ColorSafePreviewTest.php +++ b/core/modules/color/src/Tests/ColorSafePreviewTest.php @@ -21,7 +21,7 @@ * * @var array */ - public static $modules = array(); + public static $modules = array('color', 'color_test'); /** * A user with administrative permissions. @@ -44,21 +44,16 @@ * Ensures color preview.html is sanitized. */ function testTwigCacheOverride() { - $theme_handler = $this->container->get('theme_handler'); - $theme_handler->install(array('test_color_theme')); - $theme_handler->setDefault('test_color_theme'); + // Install the test theme + \Drupal::service('theme_handler')->install(array('color_test_theme')); - // The registry still works on theme globals, so set them here. - \Drupal::theme()->setActiveTheme(\Drupal::service('theme.initialization')->getActiveThemeByName('test_color_theme')); - - // Reset the theme registry, so that the new theme is used. - $this->container->set('theme.registry', NULL); - - $settings_path = 'admin/appearance/settings/test_color_theme'; + $settings_path = 'admin/appearance/settings/color_test_theme'; $this->drupalLogin($this->bigUser); $this->drupalGet($settings_path); $this->assertText('TEST COLOR PREVIEW'); + + $this->assertNoText('Sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +
+