diff --git a/core/modules/ckeditor/tests/src/FunctionalJavascript/FormErrorHandlerCKEditorTest.php b/core/modules/ckeditor/tests/src/FunctionalJavascript/FormErrorHandlerCKEditorTest.php index 3500ef1a4f6691cafb2bc2ff82d82aa807bea703..354f97bf0c8f66b6a395e8ef5981abf3f4629702 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 ca260313b86ea96fb363b9d61acd6d4d5b30dcd2..9c51a809edd28f3e505045e480286d9556e52524 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 @@ public function testAllowedMediaTypes() { $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 e68edebd81cd28204030bbb974d7eecb1b358a89..a970b3907763ad31b842b19e8a9822e2afd3d538 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 @@ public function testErrorMessages() { $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 @@ public function testPreviewUsesDefaultThemeAndIsClientCacheable() { // 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 @@ public function testPreviewUsesDefaultThemeAndIsClientCacheable() { $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 @@ public function testEmbedPreviewAccess($media_embed_enabled, $can_use_format) { $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 336c9c53e482fbe0e68954dfb3e578f0ace88788..8c81c8b29b6d811ad510c86bed2e464ae882fd03 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 @@ public function testAllowedMediaTypes() { $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 3687d2cee7bb37c5cfd4d49c9f717e71c2582cf4..35a2c06dc3390c5ee82e869ec532cc20bf3b2787 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 @@ public function testErrorMessages() { $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 @@ public function testPreviewUsesDefaultThemeAndIsClientCacheable() { // 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 @@ public function testPreviewUsesDefaultThemeAndIsClientCacheable() { $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 @@ public function testEmbedPreviewAccess($media_embed_enabled, $can_use_format) { 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 b7f739220044f09b0f7d8aa15ee7b2eca1182f17..6995bbc4fce96e17e48eeb4a3010193299e82cdf 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 1f0cac216ca40beb10f0a884baca93001fe13e38..8e8ea18eebdf8b45a63bd670141e8926993e6fd4 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 @@ public function testForum() { // 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']]; - - // 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.'); + // 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); - // 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 eb07dffe47349ece3ce96850747a5af6bbe7369a..014667ffa4ab1d3a0b3075de5dd8b2cd4f9e72df 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 @@ protected function doTestLanguageBlockAuthenticated($block_label) { $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 @@ protected function doTestLanguageBlockAuthenticated($block_label) { $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 @@ protected function doTestLanguageBlockAnonymous($block_label) { ]; $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 fee21994c8ca12995f639c3920d8fa79978a870b..24983d439d6d52756b3f964db39aae971145cdc1 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 b653034cd7937616116458c1044b1fcf5c33e390..24c88e1818667f2d82e49fd24ebe0cc272dfdea8 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 16469f50de71df2bfb7df6a448afba95325cdf95..bf22848f313a3210a788b0b82cce70cb9549700a 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 c22938cb8b874f3d784c879b0ec8002ad9fd1eb8..3bbc2410dc592e0af7fa4bae876cfd4282dd2a97 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 b15b83fbf03a38d24a220611bae73fbad042c10a..beb156969b8aafedb134931efd133fa1508fb70b 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 b339fe5f099e1d3814626905a0908b54056f203d..0e35861c49e337482b134c93296f01b4310e4bbc 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 bc584fd57bab34a483fe807041ed8720e10f5477..bd2357a3b8abbcf943613ebfb312cff81275fd4e 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 22f163f901b94bb96082a8cd3cefadb3b53274d4..a92e3c3d659dd2053883e3d30763490a54429bda 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 002cece560a20022cdf401a82d877ca913cb39d7..2350932a9b8ba5ab89ddf69f6b9a259293faf1d6 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 @@ public function testUserFieldBlock() { $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 @@ public function testStatesFieldBlock() { ]); $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 032b5cb9959b43f3413a3054ef0f7dd43ee595c3..5d2625bdcde9e856a4175ee5bc9db417f8925d5e 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 93cb4da7c5da4696dfa35864f353611213684cc4..c9093a1766c8fade17f1bae86442ef940c44c755 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 f15fe922c152926995eecd36e170636d14917ed3..eaa1dc0d68c76e449015bd84f7221419e3787080 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 c1e8908e5730d229a35262b34e1d8d91f431c70a..a80ac8b7fa2ba3c1df47a39c5a2f959ad35e7edb 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 fe995ec24b01e24d42fe68969f4a225a201f0b65..022bc834a79f0c86c65cd8cb1769f5f7e9e1ba25 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 2af74b314574c96ea5be1f3c3e789491b3c8ca27..8021710a20d5b227e47e87d21bbe516b47b0117c 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 8572b153d8c4426e151f6700efe9de38834b08cd..ebe12b42fb25cf7a2670903ee8db7a828aa0bb4d 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 b71b7934ee4d21c4c7eff545d5fc04245779369a..d6b0093271e56a3be23a525d5d65b687a07ae763 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 c6967eccc288ffa915786833a8da0036e3e6ecbf..f4dab45b327747a0caaad68f2522c8c9a00a4504 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 @@ protected function setUp(): void { // 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 10375a9c0b584c891dfe6a6b53c2298100737932..54de6cb25e35894c6d244a24630c5c74ccafcac4 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 4cd19d6f8c81cfdcfc474622e57235ee81fa7185..b0bc51fb7bac4103017d9fae62fbae3293edb7c3 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 ae5d979011547a7deac95a15afe5e4dd3857e1af..8e127c978bc5d6ad058f944bce42172672491337 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 @@ protected function assertNodeHtml(NodeInterface $node, UserInterface $user, bool 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 4deba996d51ef4c0b546745f5d6d952f860a43ec..22097e47a6ec45838ca527a70278f5ead5abe1f2 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 fc566cc49e6bf96bed98a792f2045a3b9675b779..d7fc3cec62ba08873fe696aa959b05db058a44b9 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 @@ public function testIntegerFormatter() { * 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 @@ public function testFloatFormatter() { * 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 @@ public function testFloatFormatterWithScale() { * 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 @@ public function testDecimalFormatter() { * 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 06cca02afc00a1fbfd7217e126ed973bdefc4d93..ce20653583ff0ad0901270cd5f0fbc083a7ac41e 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 @@ public function applies(RouteMatchInterface $route_match) { * {@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 2e88a4abfb47c478e4e0cf9b5d141fe7b4e24b5f..1dafdaba0582c31878d205c93b1217155e22f551 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 430883e7cbd10a2f1aa824830cd9137724a19f19..c30fd51ee28e3f204121663f27be125f751cc5d7 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 363340f8e836ec65e13feae7dad20ae1f6f57a59..470ba9aee10c68041fe0ccc7a0ae9960d04969bb 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 afd264577a87f992574ebb91d68c9691e096d68d..8a6b027c46dbbfb8181a6993b6d01284e2efee13 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 505bc76dbce0dcb56bad9c36cbdf4ff63d19a0ff..e9a53849044b5ac4e8982698ccffa98c601e282c 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 c553381e559c2b06bc84023d291ba7323a5f037f..51c9835ad5a7ec08755f7006e818701f8a848c17 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 01ccdc0c499dfc34fd160de0970e54b1d906dd0d..0c6f5a70d0c1065699f0856c161f91093d57853b 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 f3c99e46188d11f32c422149df00917f11b10d63..4413a367a0685895843fc256963921dbdd9cc090 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 e63d96f23c7acaf3bdaa74bd7db19d31a4f961d6..e9250ebe05c42e8fece914bb93d2b3c30ece0104 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 @@ public function testThemeSettings() { // 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 @@ public function testThemeSettings() { $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 @@ public function testAdministrationTheme() { // 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 @@ public function testAdministrationTheme() { // 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 @@ public function testAdministrationTheme() { // 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 d492ddc22850b6e7da9352030366565a1de64b2d..a01778dd317192623d0e30a9fdea23bd0d5323a9 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 @@ public function testRequestListener() { $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 4437f0b3c41ab46bb10c7b8ee57be81bea877521..51e64ff10b7a40c39c28f8876d7be1233c56dca6 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 @@ public function testChanges() { $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 326790d4bb37d79a723042284d10795ea253d203..514c1f4c4a24366fd1c114fae91cfcf0b5fc6b02 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 620cba5b255c490d47dadd4021b80269801071ac..fc924a6f7f507bce51ce30265797b195cddd1957 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 @@ public function testThemeToken() { $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 fbcd137b3d57ddbfed7fbaa53c80f28b3cc00cf2..38e70b8e3a3d2713104c9b2bf7978426bf705981 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 b9b4384b59f350caf9875a2724f6927211d98edc..cbf5b13c50d6799fa15bbaa2a1b6791d608c960a 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 ef19a8b327203d307c5c5f30e84f14cd4ceeecad..12cbfcf61f02d86b6cb31a3ed666eaff80bb9486 100644 --- a/core/modules/system/tests/src/FunctionalJavascript/OffCanvasTestBase.php +++ b/core/modules/system/tests/src/FunctionalJavascript/OffCanvasTestBase.php @@ -109,7 +109,7 @@ protected function getOffCanvasDialog() { * 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 067c7ff89e97860e6b9ce1f059586019a32171c5..a621a95ee759fe43f997a54b4e2fdb260170edd6 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 @@ public function testLinks() { $expected_links = ''; $expected_links .= '<ul id="somelinks">'; - $expected_links .= '<li class="a-link"><a href="' . Url::fromUri('base:a/link')->toString() . '">' . Html::escape('A <link>') . '</a></li>'; - $expected_links .= '<li class="plain-text">' . Html::escape('Plain "text"') . '</li>'; - $expected_links .= '<li class="html-text"><span class="unescaped">' . Html::escape('potentially unsafe text that <should> be escaped') . '</span></li>'; - $expected_links .= '<li class="front-page"><a href="' . Url::fromRoute('<front>')->toString() . '">' . Html::escape('Front page') . '</a></li>'; - $expected_links .= '<li class="router-test"><a href="' . \Drupal::urlGenerator()->generate('router_test.1') . '">' . Html::escape('Test route') . '</a></li>'; + $expected_links .= '<li><a href="' . Url::fromUri('base:a/link')->toString() . '">' . Html::escape('A <link>') . '</a></li>'; + $expected_links .= '<li>' . Html::escape('Plain "text"') . '</li>'; + $expected_links .= '<li><span class="unescaped">' . Html::escape('potentially unsafe text that <should> be escaped') . '</span></li>'; + $expected_links .= '<li><a href="' . Url::fromRoute('<front>')->toString() . '">' . Html::escape('Front page') . '</a></li>'; + $expected_links .= '<li><a href="' . \Drupal::urlGenerator()->generate('router_test.1') . '">' . Html::escape('Test route') . '</a></li>'; $query = ['key' => 'value']; - $expected_links .= '<li class="query-test"><a href="' . \Drupal::urlGenerator()->generate('router_test.1', $query) . '">' . Html::escape('Query test route') . '</a></li>'; + $expected_links .= '<li><a href="' . \Drupal::urlGenerator()->generate('router_test.1', $query) . '">' . Html::escape('Query test route') . '</a></li>'; $expected_links .= '</ul>'; // Verify that passing a string as heading works. @@ -267,13 +267,13 @@ public function testLinks() { ]; $expected_links = ''; $expected_links .= '<ul id="somelinks">'; - $expected_links .= '<li class="a-link"><a href="' . Url::fromUri('base:a/link')->toString() . '">' . Html::escape('A <link>') . '</a></li>'; - $expected_links .= '<li class="plain-text"><span class="a/class">' . Html::escape('Plain "text"') . '</span></li>'; - $expected_links .= '<li class="html-text"><span class="unescaped">' . Html::escape('potentially unsafe text that <should> be escaped') . '</span></li>'; - $expected_links .= '<li class="front-page"><a href="' . Url::fromRoute('<front>')->toString() . '">' . Html::escape('Front page') . '</a></li>'; - $expected_links .= '<li class="router-test"><a href="' . \Drupal::urlGenerator()->generate('router_test.1') . '">' . Html::escape('Test route') . '</a></li>'; + $expected_links .= '<li><a href="' . Url::fromUri('base:a/link')->toString() . '">' . Html::escape('A <link>') . '</a></li>'; + $expected_links .= '<li><span class="a/class">' . Html::escape('Plain "text"') . '</span></li>'; + $expected_links .= '<li><span class="unescaped">' . Html::escape('potentially unsafe text that <should> be escaped') . '</span></li>'; + $expected_links .= '<li><a href="' . Url::fromRoute('<front>')->toString() . '">' . Html::escape('Front page') . '</a></li>'; + $expected_links .= '<li><a href="' . \Drupal::urlGenerator()->generate('router_test.1') . '">' . Html::escape('Test route') . '</a></li>'; $query = ['key' => 'value']; - $expected_links .= '<li class="query-test"><a href="' . \Drupal::urlGenerator()->generate('router_test.1', $query) . '">' . Html::escape('Query test route') . '</a></li>'; + $expected_links .= '<li><a href="' . \Drupal::urlGenerator()->generate('router_test.1', $query) . '">' . Html::escape('Query test route') . '</a></li>'; $expected_links .= '</ul>'; $expected = $expected_heading . $expected_links; $this->assertThemeOutput('links', $variables, $expected); @@ -283,14 +283,14 @@ public function testLinks() { $variables['set_active_class'] = TRUE; $expected_links = ''; $expected_links .= '<ul id="somelinks">'; - $expected_links .= '<li class="a-link"><a href="' . Url::fromUri('base:a/link')->toString() . '">' . Html::escape('A <link>') . '</a></li>'; - $expected_links .= '<li class="plain-text"><span class="a/class">' . Html::escape('Plain "text"') . '</span></li>'; - $expected_links .= '<li class="html-text"><span class="unescaped">' . Html::escape('potentially unsafe text that <should> be escaped') . '</span></li>'; - $expected_links .= '<li data-drupal-link-system-path="<front>" class="front-page"><a href="' . Url::fromRoute('<front>')->toString() . '" data-drupal-link-system-path="<front>">' . Html::escape('Front page') . '</a></li>'; - $expected_links .= '<li data-drupal-link-system-path="router_test/test1" class="router-test"><a href="' . \Drupal::urlGenerator()->generate('router_test.1') . '" data-drupal-link-system-path="router_test/test1">' . Html::escape('Test route') . '</a></li>'; + $expected_links .= '<li><a href="' . Url::fromUri('base:a/link')->toString() . '">' . Html::escape('A <link>') . '</a></li>'; + $expected_links .= '<li><span class="a/class">' . Html::escape('Plain "text"') . '</span></li>'; + $expected_links .= '<li><span class="unescaped">' . Html::escape('potentially unsafe text that <should> be escaped') . '</span></li>'; + $expected_links .= '<li data-drupal-link-system-path="<front>"><a href="' . Url::fromRoute('<front>')->toString() . '" data-drupal-link-system-path="<front>">' . Html::escape('Front page') . '</a></li>'; + $expected_links .= '<li data-drupal-link-system-path="router_test/test1"><a href="' . \Drupal::urlGenerator()->generate('router_test.1') . '" data-drupal-link-system-path="router_test/test1">' . Html::escape('Test route') . '</a></li>'; $query = ['key' => 'value']; $encoded_query = Html::escape(Json::encode($query)); - $expected_links .= '<li data-drupal-link-query="' . $encoded_query . '" data-drupal-link-system-path="router_test/test1" class="query-test"><a href="' . \Drupal::urlGenerator()->generate('router_test.1', $query) . '" data-drupal-link-query="' . $encoded_query . '" data-drupal-link-system-path="router_test/test1">' . Html::escape('Query test route') . '</a></li>'; + $expected_links .= '<li data-drupal-link-query="' . $encoded_query . '" data-drupal-link-system-path="router_test/test1"><a href="' . \Drupal::urlGenerator()->generate('router_test.1', $query) . '" data-drupal-link-query="' . $encoded_query . '" data-drupal-link-system-path="router_test/test1">' . Html::escape('Query test route') . '</a></li>'; $expected_links .= '</ul>'; $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 7c6dccd013abe87f270370606bb0a6ee6a494830..6749f449fdebd7f1c95554623f417c6a87643937 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 30c0a61b61a50819b1ffa799fc060a47a0fe491a..efa4c3b9b6026aa5acee5dd19601ff2d543a5775 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 9c59c60b72fd55f04a4e1d60ef7e12ae34ee4d17..919436f472c639bef7b43ac198adbd9c1624d32b 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 d91109656ada3db8ce815212b9d18e27bd438d05..235f3dc2ba5ebaea3d25c53952fdb6fac911081c 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: '<strong>Test theme</strong>' 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 759e42015590de91a01696b7d2cd2d34c5db2bae..f6b660a8fcdf2f66472c5afed3530d64d95b92c2 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 6a92fe3f5b7e31ffa232cb32a1a479f888687313..6e3d545b15010b1460043a2ab766470eb9cae43a 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 48971e443682897dfa3276025af05f49052c46c0..fbf4326486c40c00396bee79585b5cefc40cdec8 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 347301999ed05af36793d7712e9c17d98c93d2a6..06c17df976e030b921792f372b178c3d628133e4 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 c62e2fd45ee8cc1564f9acdaa20550f1b0084b73..366f3a87ba8fafa1c3260b3f8d6f40a7afa61600 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 70f416a6d639a229c7fc7a4d805cc30d1097b7aa..acf9280843613c28e1289cf16200a28f12a0ac53 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 d71c85509c7cfde6ec10f85e1a14bc4fd163e96c..d79c1c5bae37a395b4faf80d1116f66c2e993126 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 @@ public function testBlockContext() { // 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 2cdff6fff0c64aff04ece4e79499e4b76a55268a..dee51741892e511be66e5f6125d1e04f2c9d77f9 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 6d29f37f613b1c78f493236b54483734d468659b..4a164a5826444c14d1705bdd0b118390e160c90d 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 3b02dbf76c6e9c6e8be4ae6902c9d6376437b363..cb8300ff76ac60d9acac68e963d1bb8f529fd84b 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 4665899d97b6ead10ee0a0dd738e889b9239fd6d..8cd8aa4211a00ec424e47d3c1a7fac1d007e9763 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 c0f43960a853690651335246db4669b5ba0d0acc..e6b97da7c2db13b07427719303b68b9fa2ae9c6c 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 94dbee7113686aef1b7facc7a74818a4bd9d26f4..b8711126580e2d55586ddae8c263b88cb1eb9b91 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 43bf66a4a504509f1f0f36283d3e8f124b768f1b..c7f326c4685ea52914f0ff88fe3fbccfdb6ee6dc 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 @@ public function testSummaryView() { $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 2d15924e75d3173d877df13679022a3fa9f5038f..9ea9069c5fdad11a0442ca2eba1601301ade2a24 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 9d78d91d3396775dfc113e3f580c92f7ce4c336e..4db2f4223218fb11468bf515857b38d5311842c5 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 438927ad4e7a5db6605088d4ece0dc12032c3733..7a82e2ef0b7ef5a672ae75e7785435074288cf33 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 9ecfd4d84aa57efff263c23cc8dd59e07eac2fd7..c296a7f890c1968b52638151edf7ac3f4d15d804 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 e4132326c65caeda4f9747d4c6a40ea0391e2f48..7aae19c611f46d54278d3c68dc2d9210aefc9490 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 @@ public function testEmptyRow() { '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 64495e648d1be718c309e9f6d531b22d8bafad54..99d15b17ae73ac3d2134d5c9cc1b4c96c599c729 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 cb884f3aab2660444c3c3be9ca0c7cc9e25d901d..4ba88d8fe0c8d898b88b52b8c8fb70524418549e 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 6b39a76f593c671319633464dd0d33274d1d122b..e65f3a041e79cdf86fc9e360d4a3e721e84bd002 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 de6cd41365a46c4535251b84dfd6acec6d3cc4e2..df89dca4dec5e87cce5b43597b51ae80dd573d44 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 de386436dac9abb02433484808400f9b44e75f03..a39cb068bda8900e0179e15e71f16d5e25938f87 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 84df3399c863361db8a3354cbafaebe05d30e378..2b9656e70c4d5c45a19c3f447f62041be949cfd0 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 38d7528956088f742b46aa44a38f727ab32dc68f..edaf6d3bb5bbf149d88aa00585d48730adf84c0a 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 efc12765f2a9c86b5cae75c2ec5fc55a87c74a06..fe09c9406f156a378b6a59a04033feecdf1cae89 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 e71060bc186ca0c208c22a9223525b59c5857813..91ad6e08d03303a2ab272a29a71ee3c48e74014f 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 456096c62eb1d50d8b54a048297303cef2c5e0ee..a46adc575e78a1ce2286247907ee36e2e1538c00 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 @@ public function testInstaller() { $this->drupalGet('admin/config/development/performance'); $this->submitForm($edit, 'Save configuration'); $this->drupalGet('<front>'); - $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 82d9d3c670ba643681a1b35bdf38cfcf4ec5d95c..007e4a53903c838a2e589df7119f10d5ff21789d 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 @@ public function testHookLibraryInfoByTheme() { $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 @@ public function testHookLibraryInfoByTheme() { * 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 @@ public function testLibrariesOverride() { // 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 @@ public function testBaseThemeLibrariesOverrideInSubTheme() { * 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'); - - // Activate the theme that extends the book-navigation library in classy. + // 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 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 71ed51e3b564d3f95fcd803d6a639b92664229a4..6376b922795d2bbfee620d0ad8fa09955e52e22a 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 e1960708c5d9df3dd43293df50eaa1c2bc3b4230..9b833ed5182432b709f055e3335327a4eb41ac6c 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 @@ public function testThemeTableWithEmptyMessage() { '#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 7d83fe3c01453dbf65075652b6c5b0ee72680c5b..f9823493889315084c251f3c4a1605417812eecb 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 @@ public function testElementInfoByTheme() { /** @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 d6df9261f2a8e3640aeb3ea8d5d44fe13c2a4bfd..f8e3c08aabb55644300a3d00e64bea4a0ea3d5ee 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');