diff --git a/core/modules/block/src/Tests/BlockTest.php b/core/modules/block/src/Tests/BlockTest.php index 41d376a..032b87a 100644 --- a/core/modules/block/src/Tests/BlockTest.php +++ b/core/modules/block/src/Tests/BlockTest.php @@ -481,12 +481,12 @@ public function testUninstallTheme() { $theme_handler = \Drupal::service('theme_handler'); $theme_handler->install(['seven']); - $theme_handler->setDefault('seven'); + $this->config('system.theme')->set('default', 'seven')->save(); $block = $this->drupalPlaceBlock('system_powered_by_block', ['theme' => 'seven', 'region' => 'help']); $this->drupalGet(''); $this->assertText('Powered by Drupal'); - $theme_handler->setDefault('classy'); + $this->config('system.theme')->set('default', 'classy')->save(); $theme_handler->uninstall(['seven']); // Ensure that the block configuration does not exist anymore. diff --git a/core/modules/ckeditor/src/Tests/CKEditorLoadingTest.php b/core/modules/ckeditor/src/Tests/CKEditorLoadingTest.php index e14b6e3..6efe647 100644 --- a/core/modules/ckeditor/src/Tests/CKEditorLoadingTest.php +++ b/core/modules/ckeditor/src/Tests/CKEditorLoadingTest.php @@ -201,7 +201,7 @@ function testExternalStylesheets() { $theme_handler = \Drupal::service('theme_handler'); // Case 1: Install theme which has an absolute external CSS URL. $theme_handler->install(['test_ckeditor_stylesheets_external']); - $theme_handler->setDefault('test_ckeditor_stylesheets_external'); + $this->config('system.theme')->set('default', 'test_ckeditor_stylesheets_external')->save(); $expected = [ 'https://fonts.googleapis.com/css?family=Open+Sans', ]; @@ -209,7 +209,7 @@ function testExternalStylesheets() { // Case 2: Install theme which has an external protocol-relative CSS URL. $theme_handler->install(['test_ckeditor_stylesheets_protocol_relative']); - $theme_handler->setDefault('test_ckeditor_stylesheets_protocol_relative'); + $this->config('system.theme')->set('default', 'test_ckeditor_stylesheets_protocol_relative')->save(); $expected = [ '//fonts.googleapis.com/css?family=Open+Sans', ]; @@ -217,7 +217,7 @@ function testExternalStylesheets() { // Case 3: Install theme which has a relative CSS URL. $theme_handler->install(['test_ckeditor_stylesheets_relative']); - $theme_handler->setDefault('test_ckeditor_stylesheets_relative'); + $this->config('system.theme')->set('default', 'test_ckeditor_stylesheets_relative')->save(); $expected = [ 'core/modules/system/tests/themes/test_ckeditor_stylesheets_relative/css/yokotsoko.css', ]; diff --git a/core/modules/system/src/Tests/System/ThemeTest.php b/core/modules/system/src/Tests/System/ThemeTest.php index e01f28a..667c97a 100644 --- a/core/modules/system/src/Tests/System/ThemeTest.php +++ b/core/modules/system/src/Tests/System/ThemeTest.php @@ -305,7 +305,7 @@ function testSwitchDefaultTheme() { $theme_handler = \Drupal::service('theme_handler'); // First, install Stark and set it as the default theme programmatically. $theme_handler->install(array('stark')); - $theme_handler->setDefault('stark'); + $this->config('system.theme')->set('default', 'stark')->save(); // Install Bartik and set it as the default theme. $theme_handler->install(array('bartik')); diff --git a/core/modules/system/src/Tests/Theme/TwigSettingsTest.php b/core/modules/system/src/Tests/Theme/TwigSettingsTest.php index b776639..3722431 100644 --- a/core/modules/system/src/Tests/Theme/TwigSettingsTest.php +++ b/core/modules/system/src/Tests/Theme/TwigSettingsTest.php @@ -78,7 +78,7 @@ function testTwigCacheOverride() { $extension = twig_extension(); $theme_handler = $this->container->get('theme_handler'); $theme_handler->install(array('test_theme')); - $theme_handler->setDefault('test_theme'); + $this->config('system.theme')->set('default', 'test_theme')->save(); // The registry still works on theme globals, so set them here. \Drupal::theme()->setActiveTheme(\Drupal::service('theme.initialization')->getActiveThemeByName('test_theme')); diff --git a/core/tests/Drupal/KernelTests/Core/Theme/RegistryTest.php b/core/tests/Drupal/KernelTests/Core/Theme/RegistryTest.php index 93e931b..257c61e 100644 --- a/core/tests/Drupal/KernelTests/Core/Theme/RegistryTest.php +++ b/core/tests/Drupal/KernelTests/Core/Theme/RegistryTest.php @@ -150,7 +150,7 @@ public function testThemeRegistryAlterByTheme() { /** @var \Drupal\Core\Extension\ThemeHandlerInterface $theme_handler */ $theme_handler = \Drupal::service('theme_handler'); $theme_handler->install(['test_theme']); - $theme_handler->setDefault('test_theme'); + $this->config('system.theme')->set('default', 'test_theme')->save(); $registry = new Registry(\Drupal::root(), \Drupal::cache(), \Drupal::lock(), \Drupal::moduleHandler(), $theme_handler, \Drupal::service('theme.initialization'), 'test_theme'); $registry->setThemeManager(\Drupal::theme());