diff --git a/core/modules/ckeditor/tests/src/FunctionalJavascript/FormErrorHandlerCKEditorTest.php b/core/modules/ckeditor/tests/src/FunctionalJavascript/FormErrorHandlerCKEditorTest.php index 3500ef1a4f6..354f97bf0c8 100644 --- a/core/modules/ckeditor/tests/src/FunctionalJavascript/FormErrorHandlerCKEditorTest.php +++ b/core/modules/ckeditor/tests/src/FunctionalJavascript/FormErrorHandlerCKEditorTest.php @@ -30,7 +30,7 @@ class FormErrorHandlerCKEditorTest extends WebDriverTestBase { /** * {@inheritdoc} */ - protected $defaultTheme = 'classy'; + protected $defaultTheme = 'starterkit_theme'; /** * {@inheritdoc} diff --git a/core/modules/ckeditor/tests/src/FunctionalJavascript/MediaLibraryTest.php b/core/modules/ckeditor/tests/src/FunctionalJavascript/MediaLibraryTest.php index ca260313b86..9c51a809edd 100644 --- a/core/modules/ckeditor/tests/src/FunctionalJavascript/MediaLibraryTest.php +++ b/core/modules/ckeditor/tests/src/FunctionalJavascript/MediaLibraryTest.php @@ -27,7 +27,7 @@ class MediaLibraryTest extends WebDriverTestBase { /** * {@inheritdoc} */ - protected $defaultTheme = 'classy'; + protected $defaultTheme = 'starterkit_theme'; /** * The user to use during testing. @@ -306,21 +306,20 @@ class MediaLibraryTest extends WebDriverTestBase { $this->assertNotEmpty($assert_session->waitForId('media-library-wrapper')); if (empty($allowed_media_types) || count($allowed_media_types) === 2) { - $assert_session->elementExists('css', 'li.media-library-menu-image'); - $assert_session->elementExists('css', 'li.media-library-menu-arrakis'); - $assert_session->elementTextContains('css', '.media-library-item__name', 'Fear is the mind-killer'); + $menu = $assert_session->elementExists('css', '.js-media-library-menu'); + $assert_session->elementExists('named', ['link', 'Image'], $menu); + $assert_session->elementExists('named', ['link', 'Arrakis'], $menu); + $assert_session->elementTextContains('css', '.js-media-library-item', 'Fear is the mind-killer'); } elseif (count($allowed_media_types) === 1 && !empty($allowed_media_types['image'])) { // No tabs should appear if there's only one media type available. - $assert_session->elementNotExists('css', 'li.media-library-menu-image'); - $assert_session->elementNotExists('css', 'li.media-library-menu-arrakis'); - $assert_session->elementTextContains('css', '.media-library-item__name', 'Fear is the mind-killer'); + $assert_session->elementNotExists('css', '.js-media-library-menu'); + $assert_session->elementTextContains('css', '.js-media-library-item', 'Fear is the mind-killer'); } elseif (count($allowed_media_types) === 1 && !empty($allowed_media_types['arrakis'])) { // No tabs should appear if there's only one media type available. - $assert_session->elementNotExists('css', 'li.media-library-menu-image'); - $assert_session->elementNotExists('css', 'li.media-library-menu-arrakis'); - $assert_session->elementTextContains('css', '.media-library-item__name', 'Le baron Vladimir Harkonnen'); + $assert_session->elementNotExists('css', '.js-media-library-menu'); + $assert_session->elementTextContains('css', '.js-media-library-item', 'Le baron Vladimir Harkonnen'); } } } diff --git a/core/modules/ckeditor/tests/src/FunctionalJavascript/MediaTest.php b/core/modules/ckeditor/tests/src/FunctionalJavascript/MediaTest.php index e68edebd81c..a970b390776 100644 --- a/core/modules/ckeditor/tests/src/FunctionalJavascript/MediaTest.php +++ b/core/modules/ckeditor/tests/src/FunctionalJavascript/MediaTest.php @@ -79,7 +79,7 @@ class MediaTest extends WebDriverTestBase { /** * {@inheritdoc} */ - protected $defaultTheme = 'classy'; + protected $defaultTheme = 'starterkit_theme'; /** * {@inheritdoc} @@ -242,18 +242,18 @@ class MediaTest extends WebDriverTestBase { $this->getSession()->switchToIFrame('ckeditor'); $this->assertNotEmpty($assert_session->waitForElement('css', 'drupal-media figure.caption-drupal-media .this-error-message-is-themeable')); - // Test when using the classy theme, an additional class is added in - // classy/templates/content/media-embed-error.html.twig. - $this->assertTrue($this->container->get('theme_installer')->install(['classy'])); + // Test when using the starterkit_theme theme, an additional class is added + // to the error, which is supported by + // stable9/templates/content/media-embed-error.html.twig. + $this->assertTrue($this->container->get('theme_installer')->install(['starterkit_theme'])); $this->config('system.theme') - ->set('default', 'classy') + ->set('default', 'starterkit_theme') ->save(); $this->drupalGet($this->host->toUrl('edit-form')); $this->waitForEditor(); $this->assignNameToCkeditorIframe(); $this->getSession()->switchToIFrame('ckeditor'); - $this->assertNotEmpty($assert_session->waitForElement('css', 'drupal-media figure.caption-drupal-media .this-error-message-is-themeable.media-embed-error--missing-source')); - $assert_session->responseContains('classy/css/components/media-embed-error.css'); + $this->assertNotEmpty($assert_session->waitForElement('css', 'drupal-media figure.caption-drupal-media .this-error-message-is-themeable')); // Test that restoring a valid UUID results in the media embed preview // displaying. @@ -282,8 +282,8 @@ class MediaTest extends WebDriverTestBase { // Configure a different default and admin theme, like on most Drupal sites. $this->config('system.theme') - ->set('default', 'stable') - ->set('admin', 'classy') + ->set('default', 'stable9') + ->set('admin', 'starterkit_theme') ->save(); // Assert that when looking at an embedded entity in the CKEditor Widget, @@ -296,7 +296,7 @@ class MediaTest extends WebDriverTestBase { $assert_session = $this->assertSession(); $this->assertNotEmpty($assert_session->waitForElementVisible('css', 'img[src*="image-test.png"]')); $element = $assert_session->elementExists('css', '[data-media-embed-test-active-theme]'); - $this->assertSame('stable', $element->getAttribute('data-media-embed-test-active-theme')); + $this->assertSame('stable9', $element->getAttribute('data-media-embed-test-active-theme')); // Assert that the first preview request transferred >500 B over the wire. // Then toggle source mode on and off. This causes the CKEditor widget to be // destroyed and then reconstructed. Assert that during this reconstruction, @@ -1069,7 +1069,7 @@ class MediaTest extends WebDriverTestBase { $this->assignNameToCkeditorIframe(); $this->getSession()->switchToIFrame('ckeditor'); if ($media_embed_enabled) { - // The preview rendering, which in this test will use Classy's + // The preview rendering, which in this test will use Starterkit's // media.html.twig template, will fail without the CSRF token/header. // @see ::testEmbeddedMediaPreviewWithCsrfToken() $this->assertNotEmpty($assert_session->waitForElementVisible('css', 'article.media')); diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaLibraryTest.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaLibraryTest.php index 336c9c53e48..8c81c8b29b6 100644 --- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaLibraryTest.php +++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaLibraryTest.php @@ -27,7 +27,7 @@ class MediaLibraryTest extends WebDriverTestBase { /** * {@inheritdoc} */ - protected $defaultTheme = 'classy'; + protected $defaultTheme = 'starterkit_theme'; /** * The user to use during testing. @@ -246,21 +246,20 @@ class MediaLibraryTest extends WebDriverTestBase { $this->assertNotEmpty($assert_session->waitForElementVisible('css', '#drupal-modal #media-library-wrapper')); if (empty($allowed_media_types) || count($allowed_media_types) === 2) { - $assert_session->elementExists('css', 'li.media-library-menu-image'); - $assert_session->elementExists('css', 'li.media-library-menu-arrakis'); - $assert_session->elementTextContains('css', '.media-library-item__name', 'Fear is the mind-killer'); + $menu = $assert_session->elementExists('css', '.js-media-library-menu'); + $assert_session->elementExists('named', ['link', 'Image'], $menu); + $assert_session->elementExists('named', ['link', 'Arrakis'], $menu); + $assert_session->elementTextContains('css', '.js-media-library-item', 'Fear is the mind-killer'); } elseif (count($allowed_media_types) === 1 && !empty($allowed_media_types['image'])) { // No tabs should appear if there's only one media type available. - $assert_session->elementNotExists('css', 'li.media-library-menu-image'); - $assert_session->elementNotExists('css', 'li.media-library-menu-arrakis'); - $assert_session->elementTextContains('css', '.media-library-item__name', 'Fear is the mind-killer'); + $assert_session->elementNotExists('css', '.js-media-library-menu'); + $assert_session->elementTextContains('css', '.js-media-library-item', 'Fear is the mind-killer'); } elseif (count($allowed_media_types) === 1 && !empty($allowed_media_types['arrakis'])) { // No tabs should appear if there's only one media type available. - $assert_session->elementNotExists('css', 'li.media-library-menu-image'); - $assert_session->elementNotExists('css', 'li.media-library-menu-arrakis'); - $assert_session->elementTextContains('css', '.media-library-item__name', 'Le baron Vladimir Harkonnen'); + $assert_session->elementNotExists('css', '.js-media-library-menu'); + $assert_session->elementTextContains('css', '.js-media-library-item', 'Le baron Vladimir Harkonnen'); } } } diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaTest.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaTest.php index 3687d2cee7b..35a2c06dc33 100644 --- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaTest.php +++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaTest.php @@ -77,7 +77,7 @@ class MediaTest extends WebDriverTestBase { /** * {@inheritdoc} */ - protected $defaultTheme = 'classy'; + protected $defaultTheme = 'starterkit_theme'; /** * {@inheritdoc} @@ -438,18 +438,16 @@ class MediaTest extends WebDriverTestBase { $this->waitForEditor(); $this->assertNotEmpty($assert_session->waitForElement('css', '.ck-widget.drupal-media .this-error-message-is-themeable')); - // Test when using the classy theme, an additional class is added in - // classy/templates/content/media-embed-error.html.twig. - $this->assertTrue($this->container->get('theme_installer')->install(['classy'])); + // Test when using the starterkit_theme theme, an additional class is added + // to the error, which is supported by + // stable9/templates/content/media-embed-error.html.twig. + $this->assertTrue($this->container->get('theme_installer')->install(['starterkit_theme'])); $this->config('system.theme') - ->set('default', 'classy') + ->set('default', 'starterkit_theme') ->save(); $this->drupalGet($this->host->toUrl('edit-form')); $this->waitForEditor(); - $this->assertNotEmpty($assert_session->waitForElement('css', '.ck-widget.drupal-media .this-error-message-is-themeable.media-embed-error--missing-source')); - // @todo Uncomment this in https://www.drupal.org/project/ckeditor5/issues/3194084. - // @codingStandardsIgnoreLine - //$assert_session->responseContains('classy/css/components/media-embed-error.css'); + $this->assertNotEmpty($assert_session->waitForElement('css', '.ck-widget.drupal-media .this-error-message-is-themeable')); // Test that restoring a valid UUID results in the media embed preview // displaying. @@ -476,8 +474,8 @@ class MediaTest extends WebDriverTestBase { // Configure a different default and admin theme, like on most Drupal sites. $this->config('system.theme') - ->set('default', 'stable') - ->set('admin', 'classy') + ->set('default', 'stable9') + ->set('admin', 'starterkit_theme') ->save(); // Assert that when looking at an embedded entity in the CKEditor Widget, @@ -488,7 +486,7 @@ class MediaTest extends WebDriverTestBase { $assert_session = $this->assertSession(); $this->assertNotEmpty($assert_session->waitForElementVisible('css', 'img[src*="image-test.png"]')); $element = $assert_session->elementExists('css', '[data-media-embed-test-active-theme]'); - $this->assertSame('stable', $element->getAttribute('data-media-embed-test-active-theme')); + $this->assertSame('stable9', $element->getAttribute('data-media-embed-test-active-theme')); // Assert that the first preview request transferred >500 B over the wire. // Then toggle source mode on and off. This causes the CKEditor widget to be // destroyed and then reconstructed. Assert that during this reconstruction, @@ -1092,7 +1090,7 @@ class MediaTest extends WebDriverTestBase { if ($can_use_format) { $this->waitForEditor(); if ($media_embed_enabled) { - // The preview rendering, which in this test will use Classy's + // The preview rendering, which in this test will use Starterkit theme's // media.html.twig template, will fail without the CSRF token/header. // @see ::testEmbeddedMediaPreviewWithCsrfToken() $this->assertNotEmpty($assert_session->waitForElementVisible('css', 'article.media')); diff --git a/core/modules/comment/tests/src/Functional/CommentCSSTest.php b/core/modules/comment/tests/src/Functional/CommentCSSTest.php index b7f73922004..6995bbc4fce 100644 --- a/core/modules/comment/tests/src/Functional/CommentCSSTest.php +++ b/core/modules/comment/tests/src/Functional/CommentCSSTest.php @@ -21,13 +21,8 @@ class CommentCSSTest extends CommentTestBase { * The theme to install as the default for testing. * * @var string - * - * @todo This test's reliance on classes makes Stark a bad fit as a base - * theme. Change the default theme to Starterkit once it is stable. - * - * @see https://www.drupal.org/project/drupal/issues/3267890 */ - protected $defaultTheme = 'classy'; + protected $defaultTheme = 'starterkit_theme'; protected function setUp(): void { parent::setUp(); diff --git a/core/modules/forum/tests/src/Functional/ForumTest.php b/core/modules/forum/tests/src/Functional/ForumTest.php index 1f0cac216ca..8e8ea18eebd 100644 --- a/core/modules/forum/tests/src/Functional/ForumTest.php +++ b/core/modules/forum/tests/src/Functional/ForumTest.php @@ -39,7 +39,7 @@ class ForumTest extends BrowserTestBase { /** * {@inheritdoc} */ - protected $defaultTheme = 'classy'; + protected $defaultTheme = 'starterkit_theme'; /** * A user with various administrative privileges. @@ -202,27 +202,24 @@ class ForumTest extends BrowserTestBase { // Verify the topic and post counts on the forum page. $this->drupalGet('forum'); - // Verify row for testing forum. - $forum_arg = [':forum' => 'forum-list-' . $this->forum['tid']]; + // Find the table row for the forum that has new posts. This cannot be + // reliably identified by any CSS selector or its position in the table, + // so look for an element with the "New posts" title and traverse up the + // document tree until we get to the table row that contains it. + $row = $this->assertSession()->elementExists('css', '[title="New posts"]'); + while ($row && $row->getTagName() !== 'tr') { + $row = $row->getParent(); + } + $this->assertNotEmpty($row); + $cells = $row->findAll('css', 'td'); + $this->assertCount(4, $cells); - // Topics cell contains number of topics and number of unread topics. - $xpath = $this->assertSession()->buildXPathQuery('//tr[@id=:forum]//td[@class="forum__topics"]', $forum_arg); - $topics = $this->xpath($xpath); - $topics = trim($topics[0]->getText()); - // The extracted text contains the number of topics (6) and new posts - // (also 6) in this table cell. - $this->assertEquals('6 6 new posts in forum ' . $this->forum['name'], $topics, 'Number of topics found.'); - - // Verify the number of unread topics. - $elements = $this->xpath('//tr[@id=:forum]//td[@class="forum__topics"]//a', $forum_arg); - $this->assertStringStartsWith('6 new posts', $elements[0]->getText(), 'Number of unread topics found.'); - // Verify that the forum name is in the unread topics text. - $elements = $this->xpath('//tr[@id=:forum]//em[@class="placeholder"]', $forum_arg); - $this->assertStringContainsString($this->forum['name'], $elements[0]->getText(), 'Forum name found in unread topics text.'); + // Topics cell contains number of topics (6), number of unread topics (also + // 6), and the forum name. + $this->assertEquals('6 6 new posts in forum ' . $this->forum['name'], $cells[1]->getText(), 'Number of topics found.'); // Verify total number of posts in forum. - $elements = $this->xpath('//tr[@id=:forum]//td[@class="forum__posts"]', $forum_arg); - $this->assertEquals('6', $elements[0]->getText(), 'Number of posts found.'); + $this->assertEquals('6', $cells[2]->getText(), 'Number of posts found.'); // Test loading multiple forum nodes on the front page. $this->drupalLogin($this->drupalCreateUser([ diff --git a/core/modules/language/tests/src/Functional/LanguageSwitchingTest.php b/core/modules/language/tests/src/Functional/LanguageSwitchingTest.php index eb07dffe473..014667ffa4a 100644 --- a/core/modules/language/tests/src/Functional/LanguageSwitchingTest.php +++ b/core/modules/language/tests/src/Functional/LanguageSwitchingTest.php @@ -33,14 +33,8 @@ class LanguageSwitchingTest extends BrowserTestBase { * The theme to install as the default for testing. * * @var string - * - * @todo This test's focus on classes in ::doTestLanguageBlockAuthenticated() - * and ::testLanguageBodyClass() make Stark a bad fit as a base theme. - * Change the default theme to Starterkit once it is stable. - * - * @see https://www.drupal.org/project/drupal/issues/3275543 */ - protected $defaultTheme = 'classy'; + protected $defaultTheme = 'starterkit_theme'; protected function setUp(): void { parent::setUp(); @@ -104,10 +98,8 @@ class LanguageSwitchingTest extends BrowserTestBase { $anchors = []; $labels = []; foreach ($language_switchers as $list_item) { - $classes = explode(" ", $list_item->getAttribute('class')); - [$langcode] = array_intersect($classes, ['en', 'fr']); $list_items[] = [ - 'langcode_class' => $langcode, + 'hreflang' => $list_item->getAttribute('hreflang'), 'data-drupal-link-system-path' => $list_item->getAttribute('data-drupal-link-system-path'), ]; @@ -119,8 +111,8 @@ class LanguageSwitchingTest extends BrowserTestBase { $labels[] = $link->getText(); } $expected_list_items = [ - 0 => ['langcode_class' => 'en', 'data-drupal-link-system-path' => 'user/2'], - 1 => ['langcode_class' => 'fr', 'data-drupal-link-system-path' => 'user/2'], + 0 => ['hreflang' => 'en', 'data-drupal-link-system-path' => 'user/2'], + 1 => ['hreflang' => 'fr', 'data-drupal-link-system-path' => 'user/2'], ]; $this->assertSame($expected_list_items, $list_items, 'The list items have the correct attributes that will allow the drupal.active-link library to mark them as active.'); $expected_anchors = [ @@ -163,9 +155,8 @@ class LanguageSwitchingTest extends BrowserTestBase { ]; $labels = []; foreach ($language_switchers as $list_item) { - $classes = explode(" ", $list_item->getAttribute('class')); - [$langcode] = array_intersect($classes, ['en', 'fr']); - if (in_array('is-active', $classes)) { + $langcode = $list_item->getAttribute('hreflang'); + if ($list_item->hasClass('is-active')) { $links['active'][] = $langcode; } else { diff --git a/core/modules/layout_builder/tests/src/Functional/LayoutBuilderAccessTest.php b/core/modules/layout_builder/tests/src/Functional/LayoutBuilderAccessTest.php index fee21994c8c..24983d439d6 100644 --- a/core/modules/layout_builder/tests/src/Functional/LayoutBuilderAccessTest.php +++ b/core/modules/layout_builder/tests/src/Functional/LayoutBuilderAccessTest.php @@ -26,7 +26,7 @@ class LayoutBuilderAccessTest extends BrowserTestBase { /** * {@inheritdoc} */ - protected $defaultTheme = 'classy'; + protected $defaultTheme = 'starterkit_theme'; /** * {@inheritdoc} diff --git a/core/modules/layout_builder/tests/src/Functional/LayoutBuilderTest.php b/core/modules/layout_builder/tests/src/Functional/LayoutBuilderTest.php index b653034cd79..24c88e18186 100644 --- a/core/modules/layout_builder/tests/src/Functional/LayoutBuilderTest.php +++ b/core/modules/layout_builder/tests/src/Functional/LayoutBuilderTest.php @@ -34,7 +34,7 @@ class LayoutBuilderTest extends BrowserTestBase { /** * {@inheritdoc} */ - protected $defaultTheme = 'classy'; + protected $defaultTheme = 'starterkit_theme'; /** * {@inheritdoc} diff --git a/core/modules/layout_builder/tests/src/Functional/LayoutBuilderThemeSuggestionsTest.php b/core/modules/layout_builder/tests/src/Functional/LayoutBuilderThemeSuggestionsTest.php index 16469f50de7..bf22848f313 100644 --- a/core/modules/layout_builder/tests/src/Functional/LayoutBuilderThemeSuggestionsTest.php +++ b/core/modules/layout_builder/tests/src/Functional/LayoutBuilderThemeSuggestionsTest.php @@ -24,7 +24,7 @@ class LayoutBuilderThemeSuggestionsTest extends BrowserTestBase { /** * {@inheritdoc} */ - protected $defaultTheme = 'classy'; + protected $defaultTheme = 'starterkit_theme'; /** * {@inheritdoc} diff --git a/core/modules/layout_builder/tests/src/Functional/LayoutSectionTest.php b/core/modules/layout_builder/tests/src/Functional/LayoutSectionTest.php index c22938cb8b8..3bbc2410dc5 100644 --- a/core/modules/layout_builder/tests/src/Functional/LayoutSectionTest.php +++ b/core/modules/layout_builder/tests/src/Functional/LayoutSectionTest.php @@ -28,7 +28,7 @@ class LayoutSectionTest extends BrowserTestBase { /** * {@inheritdoc} */ - protected $defaultTheme = 'classy'; + protected $defaultTheme = 'starterkit_theme'; /** * {@inheritdoc} diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/AjaxBlockTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/AjaxBlockTest.php index b15b83fbf03..beb156969b8 100644 --- a/core/modules/layout_builder/tests/src/FunctionalJavascript/AjaxBlockTest.php +++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/AjaxBlockTest.php @@ -31,7 +31,7 @@ class AjaxBlockTest extends WebDriverTestBase { /** * {@inheritdoc} */ - protected $defaultTheme = 'classy'; + protected $defaultTheme = 'starterkit_theme'; /** * {@inheritdoc} diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/BlockFormMessagesTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/BlockFormMessagesTest.php index b339fe5f099..0e35861c49e 100644 --- a/core/modules/layout_builder/tests/src/FunctionalJavascript/BlockFormMessagesTest.php +++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/BlockFormMessagesTest.php @@ -28,7 +28,7 @@ class BlockFormMessagesTest extends WebDriverTestBase { /** * {@inheritdoc} */ - protected $defaultTheme = 'classy'; + protected $defaultTheme = 'starterkit_theme'; /** * {@inheritdoc} diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/ContentPreviewToggleTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/ContentPreviewToggleTest.php index bc584fd57ba..bd2357a3b8a 100644 --- a/core/modules/layout_builder/tests/src/FunctionalJavascript/ContentPreviewToggleTest.php +++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/ContentPreviewToggleTest.php @@ -31,7 +31,7 @@ class ContentPreviewToggleTest extends WebDriverTestBase { /** * {@inheritdoc} */ - protected $defaultTheme = 'classy'; + protected $defaultTheme = 'starterkit_theme'; /** * {@inheritdoc} diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/ContextualLinksTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/ContextualLinksTest.php index 22f163f901b..a92e3c3d659 100644 --- a/core/modules/layout_builder/tests/src/FunctionalJavascript/ContextualLinksTest.php +++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/ContextualLinksTest.php @@ -32,7 +32,7 @@ class ContextualLinksTest extends WebDriverTestBase { /** * {@inheritdoc} */ - protected $defaultTheme = 'classy'; + protected $defaultTheme = 'starterkit_theme'; /** * {@inheritdoc} diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/FieldBlockTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/FieldBlockTest.php index 002cece560a..2350932a9b8 100644 --- a/core/modules/layout_builder/tests/src/FunctionalJavascript/FieldBlockTest.php +++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/FieldBlockTest.php @@ -30,7 +30,7 @@ class FieldBlockTest extends WebDriverTestBase { /** * {@inheritdoc} */ - protected $defaultTheme = 'classy'; + protected $defaultTheme = 'starterkit_theme'; /** * {@inheritdoc} @@ -81,7 +81,7 @@ class FieldBlockTest extends WebDriverTestBase { $assert_session->pageTextNotContains('Initial email'); $assert_session->pageTextContains('Date field'); - $block_url = 'admin/structure/block/add/field_block_test%3Auser%3Auser%3Afield_date/classy'; + $block_url = 'admin/structure/block/add/field_block_test%3Auser%3Auser%3Afield_date/starterkit_theme'; $assert_session->linkByHrefExists($block_url); $this->drupalGet($block_url); @@ -152,7 +152,7 @@ class FieldBlockTest extends WebDriverTestBase { ]); $timestamp_field->save(); - $this->drupalGet('admin/structure/block/add/field_block_test%3Auser%3Auser%3Afield_timestamp/classy'); + $this->drupalGet('admin/structure/block/add/field_block_test%3Auser%3Auser%3Afield_timestamp/starterkit_theme'); $this->assertFalse($page->findField('settings[formatter][settings][custom_date_format]')->isVisible(), 'Custom date format is not visible'); $page->selectFieldOption('settings[formatter][settings][date_format]', 'custom'); $this->assertTrue($page->findField('settings[formatter][settings][custom_date_format]')->isVisible(), 'Custom date format is visible'); diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockPrivateFilesTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockPrivateFilesTest.php index 032b5cb9959..5d2625bdcde 100644 --- a/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockPrivateFilesTest.php +++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockPrivateFilesTest.php @@ -30,7 +30,7 @@ class InlineBlockPrivateFilesTest extends InlineBlockTestBase { /** * {@inheritdoc} */ - protected $defaultTheme = 'classy'; + protected $defaultTheme = 'starterkit_theme'; /** * The file system service. diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTest.php index 93cb4da7c5d..c9093a1766c 100644 --- a/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTest.php +++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTest.php @@ -15,7 +15,7 @@ class InlineBlockTest extends InlineBlockTestBase { /** * {@inheritdoc} */ - protected $defaultTheme = 'classy'; + protected $defaultTheme = 'starterkit_theme'; /** * {@inheritdoc} diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderDisableInteractionsTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderDisableInteractionsTest.php index f15fe922c15..eaa1dc0d68c 100644 --- a/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderDisableInteractionsTest.php +++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderDisableInteractionsTest.php @@ -40,7 +40,7 @@ class LayoutBuilderDisableInteractionsTest extends WebDriverTestBase { /** * {@inheritdoc} */ - protected $defaultTheme = 'classy'; + protected $defaultTheme = 'starterkit_theme'; /** * {@inheritdoc} diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderOptInTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderOptInTest.php index c1e8908e573..a80ac8b7fa2 100644 --- a/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderOptInTest.php +++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderOptInTest.php @@ -23,7 +23,7 @@ class LayoutBuilderOptInTest extends WebDriverTestBase { /** * {@inheritdoc} */ - protected $defaultTheme = 'classy'; + protected $defaultTheme = 'starterkit_theme'; /** * {@inheritdoc} diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderTest.php index fe995ec24b0..022bc834a79 100644 --- a/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderTest.php +++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderTest.php @@ -35,7 +35,7 @@ class LayoutBuilderTest extends WebDriverTestBase { /** * {@inheritdoc} */ - protected $defaultTheme = 'classy'; + protected $defaultTheme = 'starterkit_theme'; /** * The node to customize with Layout Builder. diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderToolbarTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderToolbarTest.php index 2af74b31457..8021710a20d 100644 --- a/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderToolbarTest.php +++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderToolbarTest.php @@ -26,7 +26,7 @@ class LayoutBuilderToolbarTest extends WebDriverTestBase { /** * {@inheritdoc} */ - protected $defaultTheme = 'classy'; + protected $defaultTheme = 'starterkit_theme'; /** * {@inheritdoc} diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderUiTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderUiTest.php index 8572b153d8c..ebe12b42fb2 100644 --- a/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderUiTest.php +++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderUiTest.php @@ -38,7 +38,7 @@ class LayoutBuilderUiTest extends WebDriverTestBase { /** * {@inheritdoc} */ - protected $defaultTheme = 'classy'; + protected $defaultTheme = 'starterkit_theme'; /** * {@inheritdoc} diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/MoveBlockFormTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/MoveBlockFormTest.php index b71b7934ee4..d6b0093271e 100644 --- a/core/modules/layout_builder/tests/src/FunctionalJavascript/MoveBlockFormTest.php +++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/MoveBlockFormTest.php @@ -28,7 +28,7 @@ class MoveBlockFormTest extends WebDriverTestBase { /** * {@inheritdoc} */ - protected $defaultTheme = 'classy'; + protected $defaultTheme = 'starterkit_theme'; /** * {@inheritdoc} diff --git a/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderCompatibilityTestBase.php b/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderCompatibilityTestBase.php index c6967eccc28..f4dab45b327 100644 --- a/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderCompatibilityTestBase.php +++ b/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderCompatibilityTestBase.php @@ -46,8 +46,8 @@ abstract class LayoutBuilderCompatibilityTestBase extends EntityKernelTestBase { // Set up a non-admin user that is allowed to view test entities. \Drupal::currentUser()->setAccount($this->createUser(['uid' => 2], ['view test entity'])); - \Drupal::service('theme_installer')->install(['classy']); - $this->config('system.theme')->set('default', 'classy')->save(); + \Drupal::service('theme_installer')->install(['starterkit_theme']); + $this->config('system.theme')->set('default', 'starterkit_theme')->save(); $field_storage = FieldStorageConfig::create([ 'entity_type' => 'entity_test_base_field_display', diff --git a/core/modules/media_library/tests/src/FunctionalJavascript/EntityReferenceWidgetTest.php b/core/modules/media_library/tests/src/FunctionalJavascript/EntityReferenceWidgetTest.php index 10375a9c0b5..54de6cb25e3 100644 --- a/core/modules/media_library/tests/src/FunctionalJavascript/EntityReferenceWidgetTest.php +++ b/core/modules/media_library/tests/src/FunctionalJavascript/EntityReferenceWidgetTest.php @@ -23,14 +23,8 @@ class EntityReferenceWidgetTest extends MediaLibraryTestBase { * The theme to install as the default for testing. * * @var string - * - * @todo This test's reliance on classes in order to assert the order of - * field items makes Stark a bad fit as a base theme. Change the default - * theme to Starterkit once it is stable. - * - * @see https://www.drupal.org/project/drupal/issues/3281695 */ - protected $defaultTheme = 'classy'; + protected $defaultTheme = 'starterkit_theme'; /** * Test media items. diff --git a/core/modules/node/tests/src/Functional/PagePreviewTest.php b/core/modules/node/tests/src/Functional/PagePreviewTest.php index 4cd19d6f8c8..b0bc51fb7ba 100644 --- a/core/modules/node/tests/src/Functional/PagePreviewTest.php +++ b/core/modules/node/tests/src/Functional/PagePreviewTest.php @@ -48,15 +48,8 @@ class PagePreviewTest extends NodeTestBase { * The theme to install as the default for testing. * * @var string - * - * @todo The fact that PagePreviewTest::testPagePreview() makes assertions - * related to the node type being used for a body class makes Stark a bad - * fit as a base theme. Change the default theme to Starterkit once it is - * stable. - * - * @see https://www.drupal.org/project/drupal/issues/3274077 */ - protected $defaultTheme = 'classy'; + protected $defaultTheme = 'starterkit_theme'; /** * The name of the created field. diff --git a/core/modules/rdf/tests/src/Functional/Node/NodeDisplayConfigurableTest.php b/core/modules/rdf/tests/src/Functional/Node/NodeDisplayConfigurableTest.php index ae5d9790115..8e127c978bc 100644 --- a/core/modules/rdf/tests/src/Functional/Node/NodeDisplayConfigurableTest.php +++ b/core/modules/rdf/tests/src/Functional/Node/NodeDisplayConfigurableTest.php @@ -167,9 +167,6 @@ class NodeDisplayConfigurableTest extends NodeTestBase { public function provideThemes() { return [ ['claro', 'footer', TRUE], - // @todo Remove Classy from data provider in - // https://www.drupal.org/project/drupal/issues/3110137. - ['classy', 'footer', TRUE], // @todo Add coverage for olivero after fixing // https://www.drupal.org/project/drupal/issues/3215220. // ['olivero', 'footer', TRUE], diff --git a/core/modules/rdf/tests/src/Functional/StandardProfileTest.php b/core/modules/rdf/tests/src/Functional/StandardProfileTest.php index 4deba996d51..22097e47a6e 100644 --- a/core/modules/rdf/tests/src/Functional/StandardProfileTest.php +++ b/core/modules/rdf/tests/src/Functional/StandardProfileTest.php @@ -24,7 +24,7 @@ class StandardProfileTest extends BrowserTestBase { /** * {@inheritdoc} */ - protected $defaultTheme = 'classy'; + protected $defaultTheme = 'starterkit_theme'; /** * The profile used during tests. diff --git a/core/modules/rdf/tests/src/Kernel/Field/NumberFieldRdfaTest.php b/core/modules/rdf/tests/src/Kernel/Field/NumberFieldRdfaTest.php index fc566cc49e6..d7fc3cec62b 100644 --- a/core/modules/rdf/tests/src/Kernel/Field/NumberFieldRdfaTest.php +++ b/core/modules/rdf/tests/src/Kernel/Field/NumberFieldRdfaTest.php @@ -30,8 +30,8 @@ class NumberFieldRdfaTest extends FieldRdfaTestBase { * Tests the integer formatter with settings. */ public function testIntegerFormatterWithSettings() { - \Drupal::service('theme_installer')->install(['classy']); - $this->config('system.theme')->set('default', 'classy')->save(); + \Drupal::service('theme_installer')->install(['starterkit_theme']); + $this->config('system.theme')->set('default', 'starterkit_theme')->save(); $this->fieldType = 'integer'; $formatter = [ 'type' => 'number_integer', @@ -73,8 +73,8 @@ class NumberFieldRdfaTest extends FieldRdfaTestBase { * Tests the float formatter with settings. */ public function testFloatFormatterWithSettings() { - \Drupal::service('theme_installer')->install(['classy']); - $this->config('system.theme')->set('default', 'classy')->save(); + \Drupal::service('theme_installer')->install(['starterkit_theme']); + $this->config('system.theme')->set('default', 'starterkit_theme')->save(); $this->fieldType = 'float'; $formatter = [ 'type' => 'number_decimal', @@ -123,8 +123,8 @@ class NumberFieldRdfaTest extends FieldRdfaTestBase { * Tests the float formatter with a scale. Scale is exercised. */ public function testFloatFormatterWithScaleExercised() { - \Drupal::service('theme_installer')->install(['classy']); - $this->config('system.theme')->set('default', 'classy')->save(); + \Drupal::service('theme_installer')->install(['starterkit_theme']); + $this->config('system.theme')->set('default', 'starterkit_theme')->save(); $this->fieldType = 'float'; $formatter = [ 'type' => 'number_decimal', @@ -161,8 +161,8 @@ class NumberFieldRdfaTest extends FieldRdfaTestBase { * Tests the decimal formatter with settings. */ public function testDecimalFormatterWithSettings() { - \Drupal::service('theme_installer')->install(['classy']); - $this->config('system.theme')->set('default', 'classy')->save(); + \Drupal::service('theme_installer')->install(['starterkit_theme']); + $this->config('system.theme')->set('default', 'starterkit_theme')->save(); $this->fieldType = 'decimal'; $formatter = [ 'type' => 'number_decimal', diff --git a/core/modules/system/tests/modules/theme_test/src/Theme/HighPriorityThemeNegotiator.php b/core/modules/system/tests/modules/theme_test/src/Theme/HighPriorityThemeNegotiator.php index 06cca02afc0..ce20653583f 100644 --- a/core/modules/system/tests/modules/theme_test/src/Theme/HighPriorityThemeNegotiator.php +++ b/core/modules/system/tests/modules/theme_test/src/Theme/HighPriorityThemeNegotiator.php @@ -21,7 +21,7 @@ class HighPriorityThemeNegotiator implements ThemeNegotiatorInterface { * {@inheritdoc} */ public function determineActiveTheme(RouteMatchInterface $route_match) { - return 'classy'; + return 'starterkit_theme'; } } diff --git a/core/modules/system/tests/modules/theme_test/theme_test.module b/core/modules/system/tests/modules/theme_test/theme_test.module index 2e88a4abfb4..1dafdaba058 100644 --- a/core/modules/system/tests/modules/theme_test/theme_test.module +++ b/core/modules/system/tests/modules/theme_test/theme_test.module @@ -5,6 +5,7 @@ * Test module. */ +use Drupal\Component\Utility\NestedArray; use Drupal\Core\Extension\Extension; /** @@ -172,3 +173,18 @@ function theme_test_theme_suggestions_node(array $variables) { */ function template_preprocess_theme_test_registered_by_module() { } + +/** + * Implements hook_library_info_alter(). + */ +function theme_test_library_info_alter(array &$libraries, string $extension): void { + // Allow test code to simulate library changes in a particular extension by + // setting a state key in the form `theme_test_library_info_alter $extension`, + // whose values is an array containing everything that should be recursively + // merged into the given extension's library definitions. + $info = \Drupal::state()->get(__FUNCTION__ . " $extension"); + + if (is_array($info)) { + $libraries = NestedArray::mergeDeep($libraries, $info); + } +} diff --git a/core/modules/system/tests/src/Functional/Batch/ProcessingTest.php b/core/modules/system/tests/src/Functional/Batch/ProcessingTest.php index 430883e7cbd..c30fd51ee28 100644 --- a/core/modules/system/tests/src/Functional/Batch/ProcessingTest.php +++ b/core/modules/system/tests/src/Functional/Batch/ProcessingTest.php @@ -22,7 +22,7 @@ class ProcessingTest extends BrowserTestBase { /** * {@inheritdoc} */ - protected $defaultTheme = 'classy'; + protected $defaultTheme = 'starterkit_theme'; /** * Tests batches triggered outside of form submission. diff --git a/core/modules/system/tests/src/Functional/Entity/EntityViewControllerTest.php b/core/modules/system/tests/src/Functional/Entity/EntityViewControllerTest.php index 363340f8e83..470ba9aee10 100644 --- a/core/modules/system/tests/src/Functional/Entity/EntityViewControllerTest.php +++ b/core/modules/system/tests/src/Functional/Entity/EntityViewControllerTest.php @@ -22,7 +22,7 @@ class EntityViewControllerTest extends BrowserTestBase { /** * {@inheritdoc} */ - protected $defaultTheme = 'classy'; + protected $defaultTheme = 'starterkit_theme'; /** * Array of test entities. diff --git a/core/modules/system/tests/src/Functional/Form/ElementTest.php b/core/modules/system/tests/src/Functional/Form/ElementTest.php index afd264577a8..8a6b027c46d 100644 --- a/core/modules/system/tests/src/Functional/Form/ElementTest.php +++ b/core/modules/system/tests/src/Functional/Form/ElementTest.php @@ -22,7 +22,7 @@ class ElementTest extends BrowserTestBase { /** * {@inheritdoc} */ - protected $defaultTheme = 'classy'; + protected $defaultTheme = 'starterkit_theme'; /** * Tests placeholder text for elements that support placeholders. diff --git a/core/modules/system/tests/src/Functional/Form/FormTest.php b/core/modules/system/tests/src/Functional/Form/FormTest.php index 505bc76dbce..e9a53849044 100644 --- a/core/modules/system/tests/src/Functional/Form/FormTest.php +++ b/core/modules/system/tests/src/Functional/Form/FormTest.php @@ -31,7 +31,7 @@ class FormTest extends BrowserTestBase { /** * {@inheritdoc} */ - protected $defaultTheme = 'classy'; + protected $defaultTheme = 'starterkit_theme'; protected function setUp(): void { parent::setUp(); diff --git a/core/modules/system/tests/src/Functional/Menu/BreadcrumbFrontCacheContextsTest.php b/core/modules/system/tests/src/Functional/Menu/BreadcrumbFrontCacheContextsTest.php index c553381e559..51c9835ad5a 100644 --- a/core/modules/system/tests/src/Functional/Menu/BreadcrumbFrontCacheContextsTest.php +++ b/core/modules/system/tests/src/Functional/Menu/BreadcrumbFrontCacheContextsTest.php @@ -28,7 +28,7 @@ class BreadcrumbFrontCacheContextsTest extends BrowserTestBase { /** * {@inheritdoc} */ - protected $defaultTheme = 'classy'; + protected $defaultTheme = 'starterkit_theme'; /** * A test node with path alias. diff --git a/core/modules/system/tests/src/Functional/Menu/LocalTasksTest.php b/core/modules/system/tests/src/Functional/Menu/LocalTasksTest.php index 01ccdc0c499..0c6f5a70d0c 100644 --- a/core/modules/system/tests/src/Functional/Menu/LocalTasksTest.php +++ b/core/modules/system/tests/src/Functional/Menu/LocalTasksTest.php @@ -23,7 +23,7 @@ class LocalTasksTest extends BrowserTestBase { /** * {@inheritdoc} */ - protected $defaultTheme = 'classy'; + protected $defaultTheme = 'starterkit_theme'; /** * The local tasks block under testing. diff --git a/core/modules/system/tests/src/Functional/System/PageTitleTest.php b/core/modules/system/tests/src/Functional/System/PageTitleTest.php index f3c99e46188..4413a367a06 100644 --- a/core/modules/system/tests/src/Functional/System/PageTitleTest.php +++ b/core/modules/system/tests/src/Functional/System/PageTitleTest.php @@ -24,7 +24,7 @@ class PageTitleTest extends BrowserTestBase { /** * {@inheritdoc} */ - protected $defaultTheme = 'classy'; + protected $defaultTheme = 'starterkit_theme'; protected $contentUser; protected $savedTitle; diff --git a/core/modules/system/tests/src/Functional/System/ThemeTest.php b/core/modules/system/tests/src/Functional/System/ThemeTest.php index e63d96f23c7..e9250ebe05c 100644 --- a/core/modules/system/tests/src/Functional/System/ThemeTest.php +++ b/core/modules/system/tests/src/Functional/System/ThemeTest.php @@ -37,7 +37,7 @@ class ThemeTest extends BrowserTestBase { /** * {@inheritdoc} */ - protected $defaultTheme = 'classy'; + protected $defaultTheme = 'starterkit_theme'; /** * A test node. @@ -81,7 +81,7 @@ class ThemeTest extends BrowserTestBase { // Specify a filesystem path to be used for the logo. $file = current($this->drupalGetTestFiles('image')); $file_relative = strtr($file->uri, ['public:/' => PublicStream::basePath()]); - $default_theme_path = 'core/themes/classy'; + $default_theme_path = 'core/themes/starterkit_theme'; /** @var \Drupal\Core\File\FileUrlGeneratorInterface $file_url_generator */ $file_url_generator = \Drupal::service('file_url_generator'); @@ -208,7 +208,7 @@ class ThemeTest extends BrowserTestBase { $this->drupalPlaceBlock('local_tasks_block', ['region' => 'header']); $this->drupalGet('admin/appearance/settings'); $theme_handler = \Drupal::service('theme_handler'); - $this->assertSession()->linkExists($theme_handler->getName('classy')); + $this->assertSession()->linkExists($theme_handler->getName('starterkit_theme')); $this->assertSession()->linkExists($theme_handler->getName('olivero')); $this->assertSession()->linkNotExists($theme_handler->getName('stable')); @@ -311,7 +311,7 @@ class ThemeTest extends BrowserTestBase { // Check that the site default theme used on node page. $this->drupalGet('node/' . $this->node->id()); - $this->assertSession()->responseContains('core/themes/classy'); + $this->assertSession()->responseContains('core/themes/starterkit_theme'); // Check that the administration theme is used on the add content page. $this->drupalGet('node/add'); @@ -347,7 +347,7 @@ class ThemeTest extends BrowserTestBase { // Check that the site default theme used on the add content page. $this->drupalGet('node/add'); - $this->assertSession()->responseContains('core/themes/classy'); + $this->assertSession()->responseContains('core/themes/starterkit_theme'); // Reset to the default theme settings. $edit = [ @@ -359,11 +359,11 @@ class ThemeTest extends BrowserTestBase { // Check that the site default theme used on administration page. $this->drupalGet('admin'); - $this->assertSession()->responseContains('core/themes/classy'); + $this->assertSession()->responseContains('core/themes/starterkit_theme'); // Check that the site default theme used on the add content page. $this->drupalGet('node/add'); - $this->assertSession()->responseContains('core/themes/classy'); + $this->assertSession()->responseContains('core/themes/starterkit_theme'); } /** diff --git a/core/modules/system/tests/src/Functional/Theme/ThemeEarlyInitializationTest.php b/core/modules/system/tests/src/Functional/Theme/ThemeEarlyInitializationTest.php index d492ddc2285..a01778dd317 100644 --- a/core/modules/system/tests/src/Functional/Theme/ThemeEarlyInitializationTest.php +++ b/core/modules/system/tests/src/Functional/Theme/ThemeEarlyInitializationTest.php @@ -22,7 +22,7 @@ class ThemeEarlyInitializationTest extends BrowserTestBase { /** * {@inheritdoc} */ - protected $defaultTheme = 'classy'; + protected $defaultTheme = 'starterkit_theme'; /** * Tests that the theme system can generate output in a request listener. @@ -33,7 +33,7 @@ class ThemeEarlyInitializationTest extends BrowserTestBase { $this->assertSession()->responseContains('Themed output generated in a KernelEvents::REQUEST listener'); // Verify that the default theme's CSS still appears even though the theme // system was initialized early. - $this->assertSession()->responseContains('classy/css/components/action-links.css'); + $this->assertSession()->responseContains('starterkit_theme/css/components/action-links.css'); } } diff --git a/core/modules/system/tests/src/Functional/Theme/ThemeInfoTest.php b/core/modules/system/tests/src/Functional/Theme/ThemeInfoTest.php index 4437f0b3c41..51e64ff10b7 100644 --- a/core/modules/system/tests/src/Functional/Theme/ThemeInfoTest.php +++ b/core/modules/system/tests/src/Functional/Theme/ThemeInfoTest.php @@ -95,13 +95,13 @@ class ThemeInfoTest extends BrowserTestBase { $active_theme = $this->themeManager->getActiveTheme(); // Make sure we are not testing the wrong theme. $this->assertEquals('test_theme', $active_theme->getName()); - $this->assertEquals(['classy/base', 'classy/messages', 'core/normalize', 'test_theme/global-styling'], $active_theme->getLibraries()); + $this->assertEquals(['starterkit_theme/base', 'starterkit_theme/messages', 'core/normalize', 'test_theme/global-styling'], $active_theme->getLibraries()); // @see theme_test_system_info_alter() $this->state->set('theme_test.modify_info_files', TRUE); $this->resetAll(); $active_theme = $this->themeManager->getActiveTheme(); - $this->assertEquals(['classy/base', 'classy/messages', 'core/normalize', 'test_theme/global-styling', 'core/once'], $active_theme->getLibraries()); + $this->assertEquals(['starterkit_theme/base', 'starterkit_theme/messages', 'core/normalize', 'test_theme/global-styling', 'core/once'], $active_theme->getLibraries()); } } diff --git a/core/modules/system/tests/src/Functional/Theme/ThemeTest.php b/core/modules/system/tests/src/Functional/Theme/ThemeTest.php index 326790d4bb3..514c1f4c4a2 100644 --- a/core/modules/system/tests/src/Functional/Theme/ThemeTest.php +++ b/core/modules/system/tests/src/Functional/Theme/ThemeTest.php @@ -23,7 +23,7 @@ class ThemeTest extends BrowserTestBase { /** * {@inheritdoc} */ - protected $defaultTheme = 'classy'; + protected $defaultTheme = 'starterkit_theme'; /** * {@inheritdoc} diff --git a/core/modules/system/tests/src/Functional/Theme/ThemeTokenTest.php b/core/modules/system/tests/src/Functional/Theme/ThemeTokenTest.php index 620cba5b255..fc924a6f7f5 100644 --- a/core/modules/system/tests/src/Functional/Theme/ThemeTokenTest.php +++ b/core/modules/system/tests/src/Functional/Theme/ThemeTokenTest.php @@ -51,7 +51,7 @@ class ThemeTokenTest extends BrowserTestBase { $this->config('system.theme')->set('admin', 'claro')->save(); // Revisit the page. This time the page is displayed using the 'claro' theme - // and that is different from the default theme ('classy'). + // and that is different from the default theme ('stark'). $this->drupalGet('admin/structure/block'); $settings = $this->getDrupalSettings(); $this->assertNotNull($settings['ajaxPageState']['theme_token']); diff --git a/core/modules/system/tests/src/Functional/Theme/ThemeUpdateTest.php b/core/modules/system/tests/src/Functional/Theme/ThemeUpdateTest.php index fbcd137b3d5..38e70b8e3a3 100644 --- a/core/modules/system/tests/src/Functional/Theme/ThemeUpdateTest.php +++ b/core/modules/system/tests/src/Functional/Theme/ThemeUpdateTest.php @@ -16,7 +16,7 @@ class ThemeUpdateTest extends BrowserTestBase { /** * {@inheritdoc} */ - protected $defaultTheme = 'classy'; + protected $defaultTheme = 'starterkit_theme'; /** * Ensures preprocess functions run even for suggestion implementations. diff --git a/core/modules/system/tests/src/FunctionalJavascript/FrameworkTest.php b/core/modules/system/tests/src/FunctionalJavascript/FrameworkTest.php index b9b4384b59f..cbf5b13c50d 100644 --- a/core/modules/system/tests/src/FunctionalJavascript/FrameworkTest.php +++ b/core/modules/system/tests/src/FunctionalJavascript/FrameworkTest.php @@ -20,7 +20,7 @@ class FrameworkTest extends WebDriverTestBase { /** * {@inheritdoc} */ - protected $defaultTheme = 'classy'; + protected $defaultTheme = 'starterkit_theme'; /** * Tests that new JavaScript and CSS files are lazy-loaded on an AJAX request. diff --git a/core/modules/system/tests/src/FunctionalJavascript/OffCanvasTestBase.php b/core/modules/system/tests/src/FunctionalJavascript/OffCanvasTestBase.php index ef19a8b3272..12cbfcf61f0 100644 --- a/core/modules/system/tests/src/FunctionalJavascript/OffCanvasTestBase.php +++ b/core/modules/system/tests/src/FunctionalJavascript/OffCanvasTestBase.php @@ -109,7 +109,7 @@ abstract class OffCanvasTestBase extends WebDriverTestBase { * Theme names to test. */ protected function getTestThemes() { - return ['claro', 'classy', 'olivero', 'stable', 'stark']; + return ['claro', 'olivero', 'stable', 'stark']; } /** diff --git a/core/modules/system/tests/src/Kernel/Theme/FunctionsTest.php b/core/modules/system/tests/src/Kernel/Theme/FunctionsTest.php index 067c7ff89e9..a621a95ee75 100644 --- a/core/modules/system/tests/src/Kernel/Theme/FunctionsTest.php +++ b/core/modules/system/tests/src/Kernel/Theme/FunctionsTest.php @@ -30,9 +30,9 @@ class FunctionsTest extends KernelTestBase { protected function setUp(): void { parent::setUp(); - // Enable the Classy theme. - $this->container->get('theme_installer')->install(['classy']); - $this->config('system.theme')->set('default', 'classy')->save(); + // Enable the Starterkit theme. + $this->container->get('theme_installer')->install(['starterkit_theme']); + $this->config('system.theme')->set('default', 'starterkit_theme')->save(); } /** @@ -227,13 +227,13 @@ class FunctionsTest extends KernelTestBase { $expected_links = ''; $expected_links .= ''; // Verify that passing a string as heading works. @@ -267,13 +267,13 @@ class FunctionsTest extends KernelTestBase { ]; $expected_links = ''; $expected_links .= ''; $expected = $expected_heading . $expected_links; $this->assertThemeOutput('links', $variables, $expected); @@ -283,14 +283,14 @@ class FunctionsTest extends KernelTestBase { $variables['set_active_class'] = TRUE; $expected_links = ''; $expected_links .= ''; $expected = $expected_heading . $expected_links; $this->assertThemeOutput('links', $variables, $expected); diff --git a/core/modules/system/tests/themes/test_basetheme/test_basetheme.info.yml b/core/modules/system/tests/themes/test_basetheme/test_basetheme.info.yml index 7c6dccd013a..6749f449fde 100644 --- a/core/modules/system/tests/themes/test_basetheme/test_basetheme.info.yml +++ b/core/modules/system/tests/themes/test_basetheme/test_basetheme.info.yml @@ -21,5 +21,5 @@ libraries-override: css/base-remove.css: false libraries-extend: - classy/base: + starterkit_theme/base: - test_basetheme/global-styling diff --git a/core/modules/system/tests/themes/test_messages/test_messages.info.yml b/core/modules/system/tests/themes/test_messages/test_messages.info.yml index 30c0a61b61a..efa4c3b9b60 100644 --- a/core/modules/system/tests/themes/test_messages/test_messages.info.yml +++ b/core/modules/system/tests/themes/test_messages/test_messages.info.yml @@ -2,4 +2,4 @@ name: 'Theme test messages' type: theme description: 'Test theme which provides another div for messages.' version: VERSION -base theme: classy +base theme: starterkit_theme diff --git a/core/modules/system/tests/themes/test_subtheme/test_subtheme.info.yml b/core/modules/system/tests/themes/test_subtheme/test_subtheme.info.yml index 9c59c60b72f..919436f472c 100644 --- a/core/modules/system/tests/themes/test_subtheme/test_subtheme.info.yml +++ b/core/modules/system/tests/themes/test_subtheme/test_subtheme.info.yml @@ -15,5 +15,5 @@ libraries-override: base: base-add.sub-remove.css: false libraries-extend: - classy/base: + starterkit_theme/base: - test_subtheme/global-styling diff --git a/core/modules/system/tests/themes/test_theme/test_theme.info.yml b/core/modules/system/tests/themes/test_theme/test_theme.info.yml index d91109656ad..235f3dc2ba5 100644 --- a/core/modules/system/tests/themes/test_theme/test_theme.info.yml +++ b/core/modules/system/tests/themes/test_theme/test_theme.info.yml @@ -12,7 +12,7 @@ name: 'Test theme' type: theme description: 'Theme for testing the theme system' version: VERSION -base theme: classy +base theme: starterkit_theme logo: images/logo2.svg libraries: - test_theme/global-styling @@ -22,7 +22,7 @@ libraries-override: # Remove an entire library. core/drupal.progress: false # Replace particular library assets. - classy/base: + starterkit_theme/base: css: component: css/components/button.css: css/my-button.css @@ -30,14 +30,14 @@ libraries-override: css/components/container-inline.css: /themes/my_theme/css/my-container-inline.css css/components/details.css: /themes/my_theme/css/my-details.css # Remove particular library assets. - classy/dialog: + starterkit_theme/dialog: css: component: css/components/dialog.css: false system/base: css: component: - /core/themes/stable/css/system/components/js.module.css: false + /core/themes/stable9/css/system/components/js.module.css: false # It works for JS as well. core/jquery: js: @@ -46,12 +46,12 @@ libraries-override: core/drupal.dropbutton: css: component: - /core/themes/stable/css/core/dropbutton/dropbutton.css: /themes/my_theme/css/dropbutton.css + /core/themes/stable9/css/core/dropbutton/dropbutton.css: /themes/my_theme/css/dropbutton.css # Use stream wrappers. core/drupal.vertical-tabs: css: component: - /core/themes/stable/css/core/vertical-tabs.css: public://my_css/vertical-tabs.css + /core/themes/stable9/css/core/vertical-tabs.css: public://my_css/vertical-tabs.css # Use a protocol-relative URI. core/drupal.displace: js: diff --git a/core/modules/system/tests/themes/test_theme_libraries_empty/test_theme_libraries_empty.info.yml b/core/modules/system/tests/themes/test_theme_libraries_empty/test_theme_libraries_empty.info.yml index 759e4201559..f6b660a8fcd 100644 --- a/core/modules/system/tests/themes/test_theme_libraries_empty/test_theme_libraries_empty.info.yml +++ b/core/modules/system/tests/themes/test_theme_libraries_empty/test_theme_libraries_empty.info.yml @@ -2,5 +2,5 @@ name: 'Test theme libraries empty' type: theme description: 'Test theme with empty libraries in theme.info.yml' version: VERSION -base theme: classy +base theme: starterkit_theme libraries: diff --git a/core/modules/system/tests/themes/test_theme_libraries_extend/test_theme_libraries_extend.info.yml b/core/modules/system/tests/themes/test_theme_libraries_extend/test_theme_libraries_extend.info.yml index 6a92fe3f5b7..6e3d545b150 100644 --- a/core/modules/system/tests/themes/test_theme_libraries_extend/test_theme_libraries_extend.info.yml +++ b/core/modules/system/tests/themes/test_theme_libraries_extend/test_theme_libraries_extend.info.yml @@ -2,9 +2,9 @@ name: 'Test theme libraries-extend' type: theme description: 'Test Theme with libraries-extend' version: VERSION -base theme: classy +base theme: starterkit_theme libraries-extend: - classy/book-navigation: + starterkit_theme/book-navigation: - test_theme_libraries_extend/extend_one - test_theme_libraries_extend/extend_two core/drupal.dialog: diff --git a/core/modules/system/tests/themes/test_theme_libraries_override_with_drupal_settings/test_theme_libraries_override_with_drupal_settings.info.yml b/core/modules/system/tests/themes/test_theme_libraries_override_with_drupal_settings/test_theme_libraries_override_with_drupal_settings.info.yml index 48971e44368..fbf4326486c 100644 --- a/core/modules/system/tests/themes/test_theme_libraries_override_with_drupal_settings/test_theme_libraries_override_with_drupal_settings.info.yml +++ b/core/modules/system/tests/themes/test_theme_libraries_override_with_drupal_settings/test_theme_libraries_override_with_drupal_settings.info.yml @@ -2,7 +2,7 @@ name: 'Test theme libraries-override' type: theme description: 'Theme with drupalSettings libraries-override' version: VERSION -base theme: classy +base theme: starterkit_theme libraries-override: # drupalSettings libraries override. Should throw a # \Drupal\Core\Asset\Exception\InvalidLibrariesOverrideSpecificationException. diff --git a/core/modules/system/tests/themes/test_theme_libraries_override_with_invalid_asset/test_theme_libraries_override_with_invalid_asset.info.yml b/core/modules/system/tests/themes/test_theme_libraries_override_with_invalid_asset/test_theme_libraries_override_with_invalid_asset.info.yml index 347301999ed..06c17df976e 100644 --- a/core/modules/system/tests/themes/test_theme_libraries_override_with_invalid_asset/test_theme_libraries_override_with_invalid_asset.info.yml +++ b/core/modules/system/tests/themes/test_theme_libraries_override_with_invalid_asset/test_theme_libraries_override_with_invalid_asset.info.yml @@ -2,7 +2,7 @@ name: 'Test theme libraries-override' type: theme description: 'Theme with invalid libraries-override asset spec.' version: VERSION -base theme: classy +base theme: starterkit_theme libraries-override: # A malformed library asset name. Should throw a # \Drupal\Core\Asset\Exception\InvalidLibrariesOverrideSpecificationException. diff --git a/core/modules/views/tests/src/Functional/Entity/FieldRenderedEntityTranslationTest.php b/core/modules/views/tests/src/Functional/Entity/FieldRenderedEntityTranslationTest.php index c62e2fd45ee..366f3a87ba8 100644 --- a/core/modules/views/tests/src/Functional/Entity/FieldRenderedEntityTranslationTest.php +++ b/core/modules/views/tests/src/Functional/Entity/FieldRenderedEntityTranslationTest.php @@ -26,7 +26,7 @@ class FieldRenderedEntityTranslationTest extends ViewTestBase { /** * {@inheritdoc} */ - protected $defaultTheme = 'classy'; + protected $defaultTheme = 'starterkit_theme'; /** * {@inheritdoc} diff --git a/core/modules/views/tests/src/Functional/Handler/FilterDateTest.php b/core/modules/views/tests/src/Functional/Handler/FilterDateTest.php index 70f416a6d63..acf92808436 100644 --- a/core/modules/views/tests/src/Functional/Handler/FilterDateTest.php +++ b/core/modules/views/tests/src/Functional/Handler/FilterDateTest.php @@ -34,7 +34,7 @@ class FilterDateTest extends ViewTestBase { /** * {@inheritdoc} */ - protected $defaultTheme = 'classy'; + protected $defaultTheme = 'starterkit_theme'; /** * The date formatter. diff --git a/core/modules/views/tests/src/Functional/Plugin/ContextualFiltersBlockContextTest.php b/core/modules/views/tests/src/Functional/Plugin/ContextualFiltersBlockContextTest.php index d71c85509c7..d79c1c5bae3 100644 --- a/core/modules/views/tests/src/Functional/Plugin/ContextualFiltersBlockContextTest.php +++ b/core/modules/views/tests/src/Functional/Plugin/ContextualFiltersBlockContextTest.php @@ -31,7 +31,7 @@ class ContextualFiltersBlockContextTest extends ViewTestBase { /** * {@inheritdoc} */ - protected $defaultTheme = 'classy'; + protected $defaultTheme = 'starterkit_theme'; /** * Views used by this test. @@ -103,7 +103,7 @@ class ContextualFiltersBlockContextTest extends ViewTestBase { // Place test block via block UI to check if contexts are correctly exposed. $this->drupalGet( - 'admin/structure/block/add/views_block:test_view_block_with_context-block_1/classy', + 'admin/structure/block/add/views_block:test_view_block_with_context-block_1/starterkit_theme', ['query' => ['region' => 'content']] ); $edit = [ diff --git a/core/modules/views/tests/src/Functional/Plugin/ContextualFiltersStringTest.php b/core/modules/views/tests/src/Functional/Plugin/ContextualFiltersStringTest.php index 2cdff6fff0c..dee51741892 100644 --- a/core/modules/views/tests/src/Functional/Plugin/ContextualFiltersStringTest.php +++ b/core/modules/views/tests/src/Functional/Plugin/ContextualFiltersStringTest.php @@ -24,7 +24,7 @@ class ContextualFiltersStringTest extends ViewTestBase { /** * {@inheritdoc} */ - protected $defaultTheme = 'classy'; + protected $defaultTheme = 'starterkit_theme'; /** * Views used by this test. diff --git a/core/modules/views/tests/src/Functional/Plugin/DisabledDisplayTest.php b/core/modules/views/tests/src/Functional/Plugin/DisabledDisplayTest.php index 6d29f37f613..4a164a58264 100644 --- a/core/modules/views/tests/src/Functional/Plugin/DisabledDisplayTest.php +++ b/core/modules/views/tests/src/Functional/Plugin/DisabledDisplayTest.php @@ -29,7 +29,7 @@ class DisabledDisplayTest extends ViewTestBase { /** * {@inheritdoc} */ - protected $defaultTheme = 'classy'; + protected $defaultTheme = 'starterkit_theme'; protected function setUp($import_test_views = TRUE, $modules = ['views_test_config']): void { parent::setUp($import_test_views, $modules); diff --git a/core/modules/views/tests/src/Functional/Plugin/DisplayAttachmentTest.php b/core/modules/views/tests/src/Functional/Plugin/DisplayAttachmentTest.php index 3b02dbf76c6..cb8300ff76a 100644 --- a/core/modules/views/tests/src/Functional/Plugin/DisplayAttachmentTest.php +++ b/core/modules/views/tests/src/Functional/Plugin/DisplayAttachmentTest.php @@ -30,7 +30,7 @@ class DisplayAttachmentTest extends ViewTestBase { /** * {@inheritdoc} */ - protected $defaultTheme = 'classy'; + protected $defaultTheme = 'starterkit_theme'; protected function setUp($import_test_views = TRUE, $modules = ['views_test_config']): void { parent::setUp($import_test_views, $modules); diff --git a/core/modules/views/tests/src/Functional/Plugin/DisplayFeedTest.php b/core/modules/views/tests/src/Functional/Plugin/DisplayFeedTest.php index 4665899d97b..8cd8aa4211a 100644 --- a/core/modules/views/tests/src/Functional/Plugin/DisplayFeedTest.php +++ b/core/modules/views/tests/src/Functional/Plugin/DisplayFeedTest.php @@ -34,7 +34,7 @@ class DisplayFeedTest extends ViewTestBase { /** * {@inheritdoc} */ - protected $defaultTheme = 'classy'; + protected $defaultTheme = 'starterkit_theme'; protected function setUp($import_test_views = TRUE, $modules = ['views_test_config']): void { parent::setUp($import_test_views, $modules); diff --git a/core/modules/views/tests/src/Functional/Plugin/DisplayPageWebTest.php b/core/modules/views/tests/src/Functional/Plugin/DisplayPageWebTest.php index c0f43960a85..e6b97da7c2d 100644 --- a/core/modules/views/tests/src/Functional/Plugin/DisplayPageWebTest.php +++ b/core/modules/views/tests/src/Functional/Plugin/DisplayPageWebTest.php @@ -32,7 +32,7 @@ class DisplayPageWebTest extends ViewTestBase { /** * {@inheritdoc} */ - protected $defaultTheme = 'classy'; + protected $defaultTheme = 'starterkit_theme'; /** * {@inheritdoc} diff --git a/core/modules/views/tests/src/Functional/Plugin/ExposedFormTest.php b/core/modules/views/tests/src/Functional/Plugin/ExposedFormTest.php index 94dbee71136..b8711126580 100644 --- a/core/modules/views/tests/src/Functional/Plugin/ExposedFormTest.php +++ b/core/modules/views/tests/src/Functional/Plugin/ExposedFormTest.php @@ -35,7 +35,7 @@ class ExposedFormTest extends ViewTestBase { /** * {@inheritdoc} */ - protected $defaultTheme = 'classy'; + protected $defaultTheme = 'starterkit_theme'; /** * Nodes to test. diff --git a/core/modules/views/tests/src/Functional/Plugin/StyleSummaryTest.php b/core/modules/views/tests/src/Functional/Plugin/StyleSummaryTest.php index 43bf66a4a50..c7f326c4685 100644 --- a/core/modules/views/tests/src/Functional/Plugin/StyleSummaryTest.php +++ b/core/modules/views/tests/src/Functional/Plugin/StyleSummaryTest.php @@ -20,7 +20,7 @@ class StyleSummaryTest extends ViewTestBase { /** * {@inheritdoc} */ - protected $defaultTheme = 'classy'; + protected $defaultTheme = 'starterkit_theme'; /** * {@inheritdoc} @@ -60,7 +60,7 @@ class StyleSummaryTest extends ViewTestBase { $this->drupalGet('test-summary'); // Ensure styles are properly added for summary views. - $this->assertSession()->responseContains('stable/css/views/views.module.css'); + $this->assertSession()->responseContains('stable9/css/views/views.module.css'); $summary_list = $this->cssSelect('ul.views-summary li'); $this->assertCount(4, $summary_list); diff --git a/core/modules/views/tests/src/Functional/RenderCacheWebTest.php b/core/modules/views/tests/src/Functional/RenderCacheWebTest.php index 2d15924e75d..9ea9069c5fd 100644 --- a/core/modules/views/tests/src/Functional/RenderCacheWebTest.php +++ b/core/modules/views/tests/src/Functional/RenderCacheWebTest.php @@ -19,7 +19,7 @@ class RenderCacheWebTest extends ViewTestBase { /** * {@inheritdoc} */ - protected $defaultTheme = 'classy'; + protected $defaultTheme = 'starterkit_theme'; /** * {@inheritdoc} diff --git a/core/modules/views/tests/src/Functional/UserBatchActionTest.php b/core/modules/views/tests/src/Functional/UserBatchActionTest.php index 9d78d91d339..4db2f422321 100644 --- a/core/modules/views/tests/src/Functional/UserBatchActionTest.php +++ b/core/modules/views/tests/src/Functional/UserBatchActionTest.php @@ -34,7 +34,7 @@ class UserBatchActionTest extends BrowserTestBase { * Tests user admin batch. */ public function testUserAction() { - $themes = ['classy', 'olivero', 'claro']; + $themes = ['stark', 'olivero', 'claro']; $this->container->get('theme_installer')->install($themes); $this->drupalLogin($this->rootUser); diff --git a/core/modules/views/tests/src/Functional/ViewElementTest.php b/core/modules/views/tests/src/Functional/ViewElementTest.php index 438927ad4e7..7a82e2ef0b7 100644 --- a/core/modules/views/tests/src/Functional/ViewElementTest.php +++ b/core/modules/views/tests/src/Functional/ViewElementTest.php @@ -21,7 +21,7 @@ class ViewElementTest extends ViewTestBase { /** * {@inheritdoc} */ - protected $defaultTheme = 'classy'; + protected $defaultTheme = 'starterkit_theme'; /** * {@inheritdoc} diff --git a/core/modules/views/tests/src/FunctionalJavascript/GlossaryViewTest.php b/core/modules/views/tests/src/FunctionalJavascript/GlossaryViewTest.php index 9ecfd4d84aa..c296a7f890c 100644 --- a/core/modules/views/tests/src/FunctionalJavascript/GlossaryViewTest.php +++ b/core/modules/views/tests/src/FunctionalJavascript/GlossaryViewTest.php @@ -32,7 +32,7 @@ class GlossaryViewTest extends WebDriverTestBase { /** * {@inheritdoc} */ - protected $defaultTheme = 'classy'; + protected $defaultTheme = 'starterkit_theme'; /** * @var array diff --git a/core/modules/views/tests/src/Kernel/Plugin/DisplayPageTest.php b/core/modules/views/tests/src/Kernel/Plugin/DisplayPageTest.php index e4132326c65..7aae19c611f 100644 --- a/core/modules/views/tests/src/Kernel/Plugin/DisplayPageTest.php +++ b/core/modules/views/tests/src/Kernel/Plugin/DisplayPageTest.php @@ -244,7 +244,7 @@ class DisplayPageTest extends ViewsKernelTestBase { 'html_list' => '//div[@class="item-list"]//li', ]; - $themes = ['classy', 'olivero', 'stable', 'stark', 'claro']; + $themes = ['olivero', 'stable', 'stark', 'claro']; foreach ($themes as $theme) { \Drupal::service('theme_installer')->install([$theme]); diff --git a/core/profiles/testing_install_profile_all_dependencies/testing_install_profile_all_dependencies.info.yml b/core/profiles/testing_install_profile_all_dependencies/testing_install_profile_all_dependencies.info.yml index 64495e648d1..99d15b17ae7 100644 --- a/core/profiles/testing_install_profile_all_dependencies/testing_install_profile_all_dependencies.info.yml +++ b/core/profiles/testing_install_profile_all_dependencies/testing_install_profile_all_dependencies.info.yml @@ -8,4 +8,4 @@ dependencies: - drupal:dblog install: [] themes: - - classy + - starterkit_theme diff --git a/core/profiles/testing_install_profile_dependencies/testing_install_profile_dependencies.info.yml b/core/profiles/testing_install_profile_dependencies/testing_install_profile_dependencies.info.yml index cb884f3aab2..4ba88d8fe0c 100644 --- a/core/profiles/testing_install_profile_dependencies/testing_install_profile_dependencies.info.yml +++ b/core/profiles/testing_install_profile_dependencies/testing_install_profile_dependencies.info.yml @@ -8,4 +8,4 @@ dependencies: install: - ban themes: - - classy + - starterkit_theme diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormPageCacheTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormPageCacheTest.php index 6b39a76f593..e65f3a041e7 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormPageCacheTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormPageCacheTest.php @@ -19,7 +19,7 @@ class AjaxFormPageCacheTest extends WebDriverTestBase { /** * {@inheritdoc} */ - protected $defaultTheme = 'classy'; + protected $defaultTheme = 'starterkit_theme'; /** * {@inheritdoc} diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/DialogTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/DialogTest.php index de6cd41365a..df89dca4dec 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/DialogTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/DialogTest.php @@ -21,7 +21,7 @@ class DialogTest extends WebDriverTestBase { /** * {@inheritdoc} */ - protected $defaultTheme = 'classy'; + protected $defaultTheme = 'starterkit_theme'; /** * Tests sending non-JS and AJAX requests to open and manipulate modals. diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/ElementValidationTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/ElementValidationTest.php index de386436dac..a39cb068bda 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/ElementValidationTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/ElementValidationTest.php @@ -19,7 +19,7 @@ class ElementValidationTest extends WebDriverTestBase { /** * {@inheritdoc} */ - protected $defaultTheme = 'classy'; + protected $defaultTheme = 'starterkit_theme'; /** * Tries to post an Ajax change to a form that has a validated element. diff --git a/core/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php b/core/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php index 84df3399c86..2b9656e70c4 100644 --- a/core/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php +++ b/core/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php @@ -37,7 +37,7 @@ class BrowserTestBaseTest extends BrowserTestBase { /** * {@inheritdoc} */ - protected $defaultTheme = 'classy'; + protected $defaultTheme = 'starterkit_theme'; /** * Tests basic page test. diff --git a/core/tests/Drupal/FunctionalTests/Entity/ContentEntityFormFieldValidationFilteringTest.php b/core/tests/Drupal/FunctionalTests/Entity/ContentEntityFormFieldValidationFilteringTest.php index 38d75289560..edaf6d3bb5b 100644 --- a/core/tests/Drupal/FunctionalTests/Entity/ContentEntityFormFieldValidationFilteringTest.php +++ b/core/tests/Drupal/FunctionalTests/Entity/ContentEntityFormFieldValidationFilteringTest.php @@ -53,7 +53,7 @@ class ContentEntityFormFieldValidationFilteringTest extends BrowserTestBase { /** * {@inheritdoc} */ - protected $defaultTheme = 'classy'; + protected $defaultTheme = 'starterkit_theme'; /** * {@inheritdoc} diff --git a/core/tests/Drupal/FunctionalTests/Entity/DeleteMultipleFormTest.php b/core/tests/Drupal/FunctionalTests/Entity/DeleteMultipleFormTest.php index efc12765f2a..fe09c9406f1 100644 --- a/core/tests/Drupal/FunctionalTests/Entity/DeleteMultipleFormTest.php +++ b/core/tests/Drupal/FunctionalTests/Entity/DeleteMultipleFormTest.php @@ -34,7 +34,7 @@ class DeleteMultipleFormTest extends BrowserTestBase { /** * {@inheritdoc} */ - protected $defaultTheme = 'classy'; + protected $defaultTheme = 'starterkit_theme'; /** * {@inheritdoc} diff --git a/core/tests/Drupal/FunctionalTests/Entity/EntityBundleListCacheTest.php b/core/tests/Drupal/FunctionalTests/Entity/EntityBundleListCacheTest.php index e71060bc186..91ad6e08d03 100644 --- a/core/tests/Drupal/FunctionalTests/Entity/EntityBundleListCacheTest.php +++ b/core/tests/Drupal/FunctionalTests/Entity/EntityBundleListCacheTest.php @@ -27,7 +27,7 @@ class EntityBundleListCacheTest extends BrowserTestBase { /** * {@inheritdoc} */ - protected $defaultTheme = 'classy'; + protected $defaultTheme = 'starterkit_theme'; /** * {@inheritdoc} diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationTest.php index 456096c62eb..a46adc575e7 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationTest.php @@ -15,7 +15,7 @@ class InstallerTranslationTest extends InstallerTestBase { /** * {@inheritdoc} */ - protected $defaultTheme = 'classy'; + protected $defaultTheme = 'starterkit_theme'; /** * Overrides the language code in which to install Drupal. @@ -108,7 +108,7 @@ class InstallerTranslationTest extends InstallerTestBase { $this->drupalGet('admin/config/development/performance'); $this->submitForm($edit, 'Save configuration'); $this->drupalGet(''); - $this->assertSession()->responseContains('classy/css/components/action-links.css'); + $this->assertSession()->responseContains('starterkit_theme/css/components/action-links.css'); // Verify the strings from the translation files were imported. $test_samples = ['Save and continue', 'Anonymous']; diff --git a/core/tests/Drupal/KernelTests/Core/Asset/LibraryDiscoveryIntegrationTest.php b/core/tests/Drupal/KernelTests/Core/Asset/LibraryDiscoveryIntegrationTest.php index 82d9d3c670b..007e4a53903 100644 --- a/core/tests/Drupal/KernelTests/Core/Asset/LibraryDiscoveryIntegrationTest.php +++ b/core/tests/Drupal/KernelTests/Core/Asset/LibraryDiscoveryIntegrationTest.php @@ -31,7 +31,7 @@ class LibraryDiscoveryIntegrationTest extends KernelTestBase { protected function setUp(): void { parent::setUp(); - $this->container->get('theme_installer')->install(['test_theme', 'classy']); + $this->container->get('theme_installer')->install(['test_theme', 'starterkit_theme']); $this->libraryDiscovery = $this->container->get('library.discovery'); } @@ -44,8 +44,9 @@ class LibraryDiscoveryIntegrationTest extends KernelTestBase { $this->activateTheme('test_theme'); $this->assertNotEmpty($this->libraryDiscovery->getLibraryByName('test_theme', 'kitten')); - // Now make classy the active theme and assert that library is not added. - $this->activateTheme('classy'); + // Now make starterkit_theme the active theme and assert that library is not + // added. + $this->activateTheme('starterkit_theme'); $this->assertFalse($this->libraryDiscovery->getLibraryByName('test_theme', 'kitten')); } @@ -53,13 +54,14 @@ class LibraryDiscoveryIntegrationTest extends KernelTestBase { * Tests that libraries-override are applied to library definitions. */ public function testLibrariesOverride() { - // Assert some classy libraries that will be overridden or removed. - $this->activateTheme('classy'); - $this->assertAssetInLibrary('core/themes/classy/css/components/button.css', 'classy', 'base', 'css'); - $this->assertAssetInLibrary('core/themes/classy/css/components/collapse-processed.css', 'classy', 'base', 'css'); - $this->assertAssetInLibrary('core/themes/classy/css/components/container-inline.css', 'classy', 'base', 'css'); - $this->assertAssetInLibrary('core/themes/classy/css/components/details.css', 'classy', 'base', 'css'); - $this->assertAssetInLibrary('core/themes/classy/css/components/dialog.css', 'classy', 'dialog', 'css'); + // Assert some starterkit_theme libraries that will be overridden or + // removed. + $this->activateTheme('starterkit_theme'); + $this->assertAssetInLibrary('core/themes/starterkit_theme/css/components/button.css', 'starterkit_theme', 'base', 'css'); + $this->assertAssetInLibrary('core/themes/starterkit_theme/css/components/collapse-processed.css', 'starterkit_theme', 'base', 'css'); + $this->assertAssetInLibrary('core/themes/starterkit_theme/css/components/container-inline.css', 'starterkit_theme', 'base', 'css'); + $this->assertAssetInLibrary('core/themes/starterkit_theme/css/components/details.css', 'starterkit_theme', 'base', 'css'); + $this->assertAssetInLibrary('core/themes/starterkit_theme/css/components/dialog.css', 'starterkit_theme', 'dialog', 'css'); // Confirmatory assert on core library to be removed. $this->assertNotEmpty($this->libraryDiscovery->getLibraryByName('core', 'drupal.progress'), 'Confirmatory test on "core/drupal.progress"'); @@ -70,17 +72,18 @@ class LibraryDiscoveryIntegrationTest extends KernelTestBase { // Assert that entire library was correctly overridden. $this->assertEquals($this->libraryDiscovery->getLibraryByName('core', 'drupal.collapse'), $this->libraryDiscovery->getLibraryByName('test_theme', 'collapse'), 'Entire library correctly overridden.'); - // Assert that classy library assets were correctly overridden or removed. - $this->assertNoAssetInLibrary('core/themes/classy/css/components/button.css', 'classy', 'base', 'css'); - $this->assertNoAssetInLibrary('core/themes/classy/css/components/collapse-processed.css', 'classy', 'base', 'css'); - $this->assertNoAssetInLibrary('core/themes/classy/css/components/container-inline.css', 'classy', 'base', 'css'); - $this->assertNoAssetInLibrary('core/themes/classy/css/components/details.css', 'classy', 'base', 'css'); - $this->assertNoAssetInLibrary('core/themes/classy/css/components/dialog.css', 'classy', 'dialog', 'css'); + // Assert that starterkit_theme library assets were correctly overridden or + // removed. + $this->assertNoAssetInLibrary('core/themes/starterkit_theme/css/components/button.css', 'starterkit_theme', 'base', 'css'); + $this->assertNoAssetInLibrary('core/themes/starterkit_theme/css/components/collapse-processed.css', 'starterkit_theme', 'base', 'css'); + $this->assertNoAssetInLibrary('core/themes/starterkit_theme/css/components/container-inline.css', 'starterkit_theme', 'base', 'css'); + $this->assertNoAssetInLibrary('core/themes/starterkit_theme/css/components/details.css', 'starterkit_theme', 'base', 'css'); + $this->assertNoAssetInLibrary('core/themes/starterkit_theme/css/components/dialog.css', 'starterkit_theme', 'dialog', 'css'); - $this->assertAssetInLibrary('core/modules/system/tests/themes/test_theme/css/my-button.css', 'classy', 'base', 'css'); - $this->assertAssetInLibrary('core/modules/system/tests/themes/test_theme/css/my-collapse-processed.css', 'classy', 'base', 'css'); - $this->assertAssetInLibrary('themes/my_theme/css/my-container-inline.css', 'classy', 'base', 'css'); - $this->assertAssetInLibrary('themes/my_theme/css/my-details.css', 'classy', 'base', 'css'); + $this->assertAssetInLibrary('core/modules/system/tests/themes/test_theme/css/my-button.css', 'starterkit_theme', 'base', 'css'); + $this->assertAssetInLibrary('core/modules/system/tests/themes/test_theme/css/my-collapse-processed.css', 'starterkit_theme', 'base', 'css'); + $this->assertAssetInLibrary('themes/my_theme/css/my-container-inline.css', 'starterkit_theme', 'base', 'css'); + $this->assertAssetInLibrary('themes/my_theme/css/my-details.css', 'starterkit_theme', 'base', 'css'); // Assert that entire library was correctly removed. $this->assertFalse($this->libraryDiscovery->getLibraryByName('core', 'drupal.progress'), 'Entire library correctly removed.'); @@ -170,25 +173,39 @@ class LibraryDiscoveryIntegrationTest extends KernelTestBase { * Tests libraries-extend. */ public function testLibrariesExtend() { - // Activate classy themes and verify the libraries are not extended. - $this->activateTheme('classy'); - $this->assertNoAssetInLibrary('core/modules/system/tests/themes/test_theme_libraries_extend/css/extend_1.css', 'classy', 'book-navigation', 'css'); - $this->assertNoAssetInLibrary('core/modules/system/tests/themes/test_theme_libraries_extend/js/extend_1.js', 'classy', 'book-navigation', 'js'); - $this->assertNoAssetInLibrary('core/modules/system/tests/themes/test_theme_libraries_extend/css/extend_2.css', 'classy', 'book-navigation', 'css'); + // Simulate starterkit_theme defining the book-navigation library. + // @see theme_test_library_info_alter() + $this->container->get('state') + ->set('theme_test_library_info_alter starterkit_theme', [ + 'book-navigation' => [ + 'css' => [ + 'component' => [ + 'css/components/book-navigation.css' => [], + ], + ], + ], + ]); - // Activate the theme that extends the book-navigation library in classy. + // Activate starterkit_theme and verify the libraries are not extended. + $this->activateTheme('starterkit_theme'); + $this->assertNoAssetInLibrary('core/modules/system/tests/themes/test_theme_libraries_extend/css/extend_1.css', 'starterkit_theme', 'book-navigation', 'css'); + $this->assertNoAssetInLibrary('core/modules/system/tests/themes/test_theme_libraries_extend/js/extend_1.js', 'starterkit_theme', 'book-navigation', 'js'); + $this->assertNoAssetInLibrary('core/modules/system/tests/themes/test_theme_libraries_extend/css/extend_2.css', 'starterkit_theme', 'book-navigation', 'css'); + + // Activate the theme that extends the book-navigation library in + // starterkit_theme. $this->activateTheme('test_theme_libraries_extend'); - $this->assertAssetInLibrary('core/modules/system/tests/themes/test_theme_libraries_extend/css/extend_1.css', 'classy', 'book-navigation', 'css'); - $this->assertAssetInLibrary('core/modules/system/tests/themes/test_theme_libraries_extend/js/extend_1.js', 'classy', 'book-navigation', 'js'); - $this->assertAssetInLibrary('core/modules/system/tests/themes/test_theme_libraries_extend/css/extend_2.css', 'classy', 'book-navigation', 'css'); + $this->assertAssetInLibrary('core/modules/system/tests/themes/test_theme_libraries_extend/css/extend_1.css', 'starterkit_theme', 'book-navigation', 'css'); + $this->assertAssetInLibrary('core/modules/system/tests/themes/test_theme_libraries_extend/js/extend_1.js', 'starterkit_theme', 'book-navigation', 'js'); + $this->assertAssetInLibrary('core/modules/system/tests/themes/test_theme_libraries_extend/css/extend_2.css', 'starterkit_theme', 'book-navigation', 'css'); // Activate a sub theme and confirm that it inherits the library assets // extended in the base theme as well as its own. - $this->assertNoAssetInLibrary('core/modules/system/tests/themes/test_basetheme/css/base-libraries-extend.css', 'classy', 'base', 'css'); - $this->assertNoAssetInLibrary('core/modules/system/tests/themes/test_subtheme/css/sub-libraries-extend.css', 'classy', 'base', 'css'); + $this->assertNoAssetInLibrary('core/modules/system/tests/themes/test_basetheme/css/base-libraries-extend.css', 'starterkit_theme', 'base', 'css'); + $this->assertNoAssetInLibrary('core/modules/system/tests/themes/test_subtheme/css/sub-libraries-extend.css', 'starterkit_theme', 'base', 'css'); $this->activateTheme('test_subtheme'); - $this->assertAssetInLibrary('core/modules/system/tests/themes/test_basetheme/css/base-libraries-extend.css', 'classy', 'base', 'css'); - $this->assertAssetInLibrary('core/modules/system/tests/themes/test_subtheme/css/sub-libraries-extend.css', 'classy', 'base', 'css'); + $this->assertAssetInLibrary('core/modules/system/tests/themes/test_basetheme/css/base-libraries-extend.css', 'starterkit_theme', 'base', 'css'); + $this->assertAssetInLibrary('core/modules/system/tests/themes/test_subtheme/css/sub-libraries-extend.css', 'starterkit_theme', 'base', 'css'); // Activate test theme that extends with a non-existent library. An // exception should be thrown. diff --git a/core/tests/Drupal/KernelTests/Core/Asset/ResolvedLibraryDefinitionsFilesMatchTest.php b/core/tests/Drupal/KernelTests/Core/Asset/ResolvedLibraryDefinitionsFilesMatchTest.php index 71ed51e3b56..6376b922795 100644 --- a/core/tests/Drupal/KernelTests/Core/Asset/ResolvedLibraryDefinitionsFilesMatchTest.php +++ b/core/tests/Drupal/KernelTests/Core/Asset/ResolvedLibraryDefinitionsFilesMatchTest.php @@ -61,7 +61,6 @@ class ResolvedLibraryDefinitionsFilesMatchTest extends KernelTestBase { */ protected $allThemes = [ 'claro', - 'classy', 'olivero', 'stable', 'stark', diff --git a/core/tests/Drupal/KernelTests/Core/Render/Element/TableTest.php b/core/tests/Drupal/KernelTests/Core/Render/Element/TableTest.php index e1960708c5d..9b833ed5182 100644 --- a/core/tests/Drupal/KernelTests/Core/Render/Element/TableTest.php +++ b/core/tests/Drupal/KernelTests/Core/Render/Element/TableTest.php @@ -81,9 +81,9 @@ class TableTest extends KernelTestBase { '#empty' => 'Empty row.', ]; - // Enable the Classy theme. - \Drupal::service('theme_installer')->install(['classy']); - $this->config('system.theme')->set('default', 'classy')->save(); + // Enable the Starterkit theme. + \Drupal::service('theme_installer')->install(['starterkit_theme']); + $this->config('system.theme')->set('default', 'starterkit_theme')->save(); $this->render($table); $this->removeWhiteSpace(); diff --git a/core/tests/Drupal/KernelTests/Core/Render/ElementInfoIntegrationTest.php b/core/tests/Drupal/KernelTests/Core/Render/ElementInfoIntegrationTest.php index 7d83fe3c014..f9823493889 100644 --- a/core/tests/Drupal/KernelTests/Core/Render/ElementInfoIntegrationTest.php +++ b/core/tests/Drupal/KernelTests/Core/Render/ElementInfoIntegrationTest.php @@ -17,7 +17,7 @@ class ElementInfoIntegrationTest extends KernelTestBase { protected function setUp(): void { parent::setUp(); - $this->container->get('theme_installer')->install(['test_theme', 'classy']); + $this->container->get('theme_installer')->install(['test_theme', 'starterkit_theme']); } /** @@ -33,7 +33,7 @@ class ElementInfoIntegrationTest extends KernelTestBase { /** @var \Drupal\Core\Render\ElementInfoManagerInterface $element_info */ $element_info = $this->container->get('plugin.manager.element_info'); - $theme_manager->setActiveTheme($theme_initializer->getActiveThemeByName('classy')); + $theme_manager->setActiveTheme($theme_initializer->getActiveThemeByName('starterkit_theme')); $this->assertEquals(60, $element_info->getInfo('textfield')['#size']); $theme_manager->setActiveTheme($theme_initializer->getActiveThemeByName('test_theme')); diff --git a/core/tests/Drupal/KernelTests/Core/Theme/MessageTest.php b/core/tests/Drupal/KernelTests/Core/Theme/MessageTest.php index d6df9261f2a..f8e3c08aabb 100644 --- a/core/tests/Drupal/KernelTests/Core/Theme/MessageTest.php +++ b/core/tests/Drupal/KernelTests/Core/Theme/MessageTest.php @@ -20,9 +20,9 @@ class MessageTest extends KernelTestBase { * Tests setting messages output. */ public function testMessages() { - // Enable the Classy theme. - \Drupal::service('theme_installer')->install(['classy']); - $this->config('system.theme')->set('default', 'classy')->save(); + // Enable the Starterkit theme. + \Drupal::service('theme_installer')->install(['starterkit_theme']); + $this->config('system.theme')->set('default', 'starterkit_theme')->save(); \Drupal::messenger()->addError('An error occurred'); \Drupal::messenger()->addStatus('But then something nice happened');