Loading core/modules/system/tests/src/Functional/System/ThemeTest.php +2 −1 Original line number Diff line number Diff line Loading @@ -423,7 +423,7 @@ public function testInvalidTheme() { public function testUninstallingThemes() { // Install olivero. \Drupal::service('theme_installer')->install(['olivero']); // Set up claro as the admin theme. // Set up Claro as the admin theme. \Drupal::service('theme_installer')->install(['claro']); $edit = [ 'admin_theme' => 'claro', Loading @@ -431,6 +431,7 @@ public function testUninstallingThemes() { ]; $this->drupalGet('admin/appearance'); $this->submitForm($edit, 'Save configuration'); // Set olivero as the default theme. $this->cssSelect('a[title="Set Olivero as default theme"]')[0]->click(); // Check that claro cannot be uninstalled as it is the admin theme. Loading core/modules/system/tests/src/Functional/Theme/EntityFilteringThemeTest.php +10 −0 Original line number Diff line number Diff line Loading @@ -6,6 +6,7 @@ use Drupal\Core\Extension\ExtensionDiscovery; use Drupal\comment\CommentInterface; use Drupal\comment\Plugin\Field\FieldType\CommentItemInterface; use Drupal\Core\Extension\ExtensionLifecycle; use Drupal\node\NodeInterface; use Drupal\comment\Entity\Comment; use Drupal\taxonomy\Entity\Term; Loading Loading @@ -87,6 +88,15 @@ protected function setUp(): void { // Install all available non-testing themes. $listing = new ExtensionDiscovery(\Drupal::root()); $this->themes = $listing->scan('theme', FALSE); /** @var \Drupal\Core\Extension\ThemeHandlerInterface $theme_handler */ $theme_data = \Drupal::service('theme_handler')->rebuildThemeData(); foreach (array_keys($this->themes) as $theme) { // Skip obsolete and deprecated themes. $info = $theme_data[$theme]->info; if ($info[ExtensionLifecycle::LIFECYCLE_IDENTIFIER] === ExtensionLifecycle::OBSOLETE || $info[ExtensionLifecycle::LIFECYCLE_IDENTIFIER] === ExtensionLifecycle::DEPRECATED) { unset($this->themes[$theme]); } } \Drupal::service('theme_installer')->install(array_keys($this->themes)); // Create a test user. Loading core/tests/Drupal/KernelTests/Core/Asset/ResolvedLibraryDefinitionsFilesMatchTest.php +1 −2 Original line number Diff line number Diff line Loading @@ -60,10 +60,9 @@ class ResolvedLibraryDefinitionsFilesMatchTest extends KernelTestBase { * @var string[] */ protected $allThemes = [ 'bartik', 'claro', 'classy', 'olivero', 'seven', 'stable', 'stark', ]; Loading Loading
core/modules/system/tests/src/Functional/System/ThemeTest.php +2 −1 Original line number Diff line number Diff line Loading @@ -423,7 +423,7 @@ public function testInvalidTheme() { public function testUninstallingThemes() { // Install olivero. \Drupal::service('theme_installer')->install(['olivero']); // Set up claro as the admin theme. // Set up Claro as the admin theme. \Drupal::service('theme_installer')->install(['claro']); $edit = [ 'admin_theme' => 'claro', Loading @@ -431,6 +431,7 @@ public function testUninstallingThemes() { ]; $this->drupalGet('admin/appearance'); $this->submitForm($edit, 'Save configuration'); // Set olivero as the default theme. $this->cssSelect('a[title="Set Olivero as default theme"]')[0]->click(); // Check that claro cannot be uninstalled as it is the admin theme. Loading
core/modules/system/tests/src/Functional/Theme/EntityFilteringThemeTest.php +10 −0 Original line number Diff line number Diff line Loading @@ -6,6 +6,7 @@ use Drupal\Core\Extension\ExtensionDiscovery; use Drupal\comment\CommentInterface; use Drupal\comment\Plugin\Field\FieldType\CommentItemInterface; use Drupal\Core\Extension\ExtensionLifecycle; use Drupal\node\NodeInterface; use Drupal\comment\Entity\Comment; use Drupal\taxonomy\Entity\Term; Loading Loading @@ -87,6 +88,15 @@ protected function setUp(): void { // Install all available non-testing themes. $listing = new ExtensionDiscovery(\Drupal::root()); $this->themes = $listing->scan('theme', FALSE); /** @var \Drupal\Core\Extension\ThemeHandlerInterface $theme_handler */ $theme_data = \Drupal::service('theme_handler')->rebuildThemeData(); foreach (array_keys($this->themes) as $theme) { // Skip obsolete and deprecated themes. $info = $theme_data[$theme]->info; if ($info[ExtensionLifecycle::LIFECYCLE_IDENTIFIER] === ExtensionLifecycle::OBSOLETE || $info[ExtensionLifecycle::LIFECYCLE_IDENTIFIER] === ExtensionLifecycle::DEPRECATED) { unset($this->themes[$theme]); } } \Drupal::service('theme_installer')->install(array_keys($this->themes)); // Create a test user. Loading
core/tests/Drupal/KernelTests/Core/Asset/ResolvedLibraryDefinitionsFilesMatchTest.php +1 −2 Original line number Diff line number Diff line Loading @@ -60,10 +60,9 @@ class ResolvedLibraryDefinitionsFilesMatchTest extends KernelTestBase { * @var string[] */ protected $allThemes = [ 'bartik', 'claro', 'classy', 'olivero', 'seven', 'stable', 'stark', ]; Loading