Loading core/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayTestBase.php +3 −3 Original line number Diff line number Diff line Loading @@ -156,10 +156,10 @@ protected function assertOffCanvasBlockFormIsValid() { * {@inheritdoc} */ protected function getTestThemes() { // Remove 'seven' theme. Settings Tray "Edit Mode" will not work with // 'seven' because it removes all contextual links. // Remove 'claro' theme. Settings Tray "Edit Mode" will not work with this // theme because it removes all contextual links. return array_filter(parent::getTestThemes(), function ($theme) { return $theme !== 'seven'; return ($theme !== 'claro'); }); } Loading core/modules/system/tests/modules/image_lazy_load_test/src/Controller/ImageLazyLoadController.php +3 −3 Original line number Diff line number Diff line Loading @@ -18,7 +18,7 @@ class ImageLazyLoadController extends ControllerBase { public function renderImage() { $images['with-dimensions'] = [ '#theme' => 'image', '#uri' => '/core/themes/bartik/logo.svg', '#uri' => '/core/themes/olivero/logo.svg', '#alt' => 'Image lazy load testing image', '#prefix' => '<div id="with-dimensions">', '#suffix' => '</div>', Loading @@ -28,7 +28,7 @@ public function renderImage() { $images['without-dimensions'] = [ '#theme' => 'image', '#uri' => '/core/themes/bartik/logo.svg', '#uri' => '/core/themes/olivero/logo.svg', '#alt' => 'Image lazy load testing image without dimensions', '#prefix' => '<div id="without-dimensions">', '#suffix' => '</div>', Loading @@ -36,7 +36,7 @@ public function renderImage() { $images['override-loading-attribute'] = [ '#theme' => 'image', '#uri' => '/core/themes/bartik/logo.svg', '#uri' => '/core/themes/olivero/logo.svg', '#alt' => 'Image lazy load test loading attribute can be overridden', '#prefix' => '<div id="override-loading-attribute">', '#suffix' => '</div>', Loading core/modules/system/tests/src/Functional/System/ThemeTest.php +22 −24 Original line number Diff line number Diff line Loading @@ -285,11 +285,11 @@ public function testThemeSettingsRenderCacheClear() { * Tests the administration theme functionality. */ public function testAdministrationTheme() { $this->container->get('theme_installer')->install(['seven']); $this->container->get('theme_installer')->install(['claro']); // Install an administration theme and show it on the node admin pages. $edit = [ 'admin_theme' => 'seven', 'admin_theme' => 'claro', 'use_admin_theme' => TRUE, ]; $this->drupalGet('admin/appearance'); Loading @@ -306,7 +306,7 @@ public function testAdministrationTheme() { // Check that the administration theme is used on an administration page. $this->drupalGet('admin/config'); $this->assertSession()->responseContains('core/themes/seven'); $this->assertSession()->responseContains('core/themes/claro'); // Check that the site default theme used on node page. $this->drupalGet('node/' . $this->node->id()); Loading @@ -314,11 +314,11 @@ public function testAdministrationTheme() { // Check that the administration theme is used on the add content page. $this->drupalGet('node/add'); $this->assertSession()->responseContains('core/themes/seven'); $this->assertSession()->responseContains('core/themes/claro'); // Check that the administration theme is used on the edit content page. $this->drupalGet('node/' . $this->node->id() . '/edit'); $this->assertSession()->responseContains('core/themes/seven'); $this->assertSession()->responseContains('core/themes/claro'); // Disable the admin theme on the node admin pages. $edit = [ Loading @@ -333,7 +333,7 @@ public function testAdministrationTheme() { // Check that the administration theme is used on an administration page. $this->drupalGet('admin/config'); $this->assertSession()->responseContains('core/themes/seven'); $this->assertSession()->responseContains('core/themes/claro'); // Ensure that the admin theme is also visible on the 403 page. $normal_user = $this->drupalCreateUser(['view the administration theme']); Loading @@ -341,7 +341,7 @@ public function testAdministrationTheme() { // Check that the administration theme is used on an administration page. $this->drupalGet('admin/config'); $this->assertSession()->statusCodeEquals(403); $this->assertSession()->responseContains('core/themes/seven'); $this->assertSession()->responseContains('core/themes/claro'); $this->drupalLogin($this->adminUser); // Check that the site default theme used on the add content page. Loading Loading @@ -420,25 +420,24 @@ public function testInvalidTheme() { * Tests uninstalling of themes works. */ public function testUninstallingThemes() { // Install Olivero and set it as the default theme. // Install olivero. \Drupal::service('theme_installer')->install(['olivero']); // Set up seven as the admin theme. \Drupal::service('theme_installer')->install(['seven']); // Set up claro as the admin theme. \Drupal::service('theme_installer')->install(['claro']); $edit = [ 'admin_theme' => 'seven', 'admin_theme' => 'claro', 'use_admin_theme' => TRUE, ]; $this->drupalGet('admin/appearance'); $this->submitForm($edit, 'Save configuration'); $this->drupalGet('admin/appearance'); $this->clickLink('Set as default'); // Check that seven cannot be uninstalled as it is the admin theme. $this->assertSession()->responseNotContains('Uninstall Seven theme'); // Set olivero as the default theme. $this->cssSelect('a[title="Set Olivero as default theme"]')[0]->click(); // Check that claro cannot be uninstalled as it is the admin theme. $this->assertSession()->responseNotContains('Uninstall claro theme'); // Check that olivero cannot be uninstalled as it is the default theme. $this->assertSession()->responseNotContains('Uninstall Olivero theme'); // Check that the classy theme cannot be uninstalled as it is a base theme // of seven and olivero. // of claro and olivero. $this->assertSession()->responseNotContains('Uninstall Classy theme'); // Install Stark and set it as the default theme. Loading @@ -451,8 +450,8 @@ public function testUninstallingThemes() { $this->drupalGet('admin/appearance'); $this->submitForm($edit, 'Save configuration'); // Check that seven can be uninstalled now. $this->assertSession()->responseContains('Uninstall Seven theme'); // Check that claro can be uninstalled now. $this->assertSession()->responseContains('Uninstall claro theme'); // Check that the classy theme still cannot be uninstalled as it is a // base theme of olivero. $this->assertSession()->responseNotContains('Uninstall Classy theme'); Loading @@ -467,12 +466,11 @@ public function testUninstallingThemes() { // base themes have been. $this->assertSession()->responseNotContains('Uninstall Classy theme'); // Uninstall each of the three themes starting with Olivero. $this->clickLink('Uninstall'); // Uninstall each of the two themes starting with Olivero. $this->cssSelect('a[title="Uninstall Olivero theme"]')[0]->click(); $this->assertSession()->responseContains('The <em class="placeholder">Olivero</em> theme has been uninstalled'); // Seven is the second in the list. $this->clickLink('Uninstall'); $this->assertSession()->responseContains('The <em class="placeholder">Seven</em> theme has been uninstalled'); $this->cssSelect('a[title="Uninstall Claro theme"]')[0]->click(); $this->assertSession()->responseContains('The <em class="placeholder">Claro</em> theme has been uninstalled'); // Check that the classy theme still can't be uninstalled as it is hidden. $this->assertSession()->responseNotContains('Uninstall Classy theme'); Loading core/modules/system/tests/src/Functional/Theme/ThemeTokenTest.php +4 −4 Original line number Diff line number Diff line Loading @@ -46,11 +46,11 @@ public function testThemeToken() { $settings = $this->getDrupalSettings(); $this->assertNull($settings['ajaxPageState']['theme_token']); // Install 'seven' and configure it as administrative theme. $this->container->get('theme_installer')->install(['seven']); $this->config('system.theme')->set('admin', 'seven')->save(); // Install 'claro' and configure it as administrative theme. $this->container->get('theme_installer')->install(['claro']); $this->config('system.theme')->set('admin', 'claro')->save(); // Revisit the page. This time the page is displayed using the 'seven' theme // Revisit the page. This time the page is displayed using the 'claro' theme // and that is different from the default theme ('classy'). $this->drupalGet('admin/structure/block'); $settings = $this->getDrupalSettings(); Loading core/modules/system/tests/src/Functional/UpdateSystem/BrokenCacheUpdateTest.php +2 −2 Original line number Diff line number Diff line Loading @@ -46,7 +46,7 @@ public function testUpdate() { 'checksum' => 0, ]; $insert->fields($fields); $fields['cid'] = 'element_info_build:seven'; $fields['cid'] = 'element_info_build:claro'; $fields['tags'] = 'element_info_build'; $insert->values(array_values($fields)); $fields['cid'] = 'element_info_build:stark'; Loading @@ -56,7 +56,7 @@ public function testUpdate() { $this->runUpdates(); // Caches should have been cleared at this point. $count = (int) $connection->select('cache_discovery') ->condition('cid', ['element_info', 'element_info_build:seven', 'element_info_build:stark'], 'IN') ->condition('cid', ['element_info', 'element_info_build:claro', 'element_info_build:stark'], 'IN') ->countQuery() ->execute() ->fetchField(); Loading Loading
core/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayTestBase.php +3 −3 Original line number Diff line number Diff line Loading @@ -156,10 +156,10 @@ protected function assertOffCanvasBlockFormIsValid() { * {@inheritdoc} */ protected function getTestThemes() { // Remove 'seven' theme. Settings Tray "Edit Mode" will not work with // 'seven' because it removes all contextual links. // Remove 'claro' theme. Settings Tray "Edit Mode" will not work with this // theme because it removes all contextual links. return array_filter(parent::getTestThemes(), function ($theme) { return $theme !== 'seven'; return ($theme !== 'claro'); }); } Loading
core/modules/system/tests/modules/image_lazy_load_test/src/Controller/ImageLazyLoadController.php +3 −3 Original line number Diff line number Diff line Loading @@ -18,7 +18,7 @@ class ImageLazyLoadController extends ControllerBase { public function renderImage() { $images['with-dimensions'] = [ '#theme' => 'image', '#uri' => '/core/themes/bartik/logo.svg', '#uri' => '/core/themes/olivero/logo.svg', '#alt' => 'Image lazy load testing image', '#prefix' => '<div id="with-dimensions">', '#suffix' => '</div>', Loading @@ -28,7 +28,7 @@ public function renderImage() { $images['without-dimensions'] = [ '#theme' => 'image', '#uri' => '/core/themes/bartik/logo.svg', '#uri' => '/core/themes/olivero/logo.svg', '#alt' => 'Image lazy load testing image without dimensions', '#prefix' => '<div id="without-dimensions">', '#suffix' => '</div>', Loading @@ -36,7 +36,7 @@ public function renderImage() { $images['override-loading-attribute'] = [ '#theme' => 'image', '#uri' => '/core/themes/bartik/logo.svg', '#uri' => '/core/themes/olivero/logo.svg', '#alt' => 'Image lazy load test loading attribute can be overridden', '#prefix' => '<div id="override-loading-attribute">', '#suffix' => '</div>', Loading
core/modules/system/tests/src/Functional/System/ThemeTest.php +22 −24 Original line number Diff line number Diff line Loading @@ -285,11 +285,11 @@ public function testThemeSettingsRenderCacheClear() { * Tests the administration theme functionality. */ public function testAdministrationTheme() { $this->container->get('theme_installer')->install(['seven']); $this->container->get('theme_installer')->install(['claro']); // Install an administration theme and show it on the node admin pages. $edit = [ 'admin_theme' => 'seven', 'admin_theme' => 'claro', 'use_admin_theme' => TRUE, ]; $this->drupalGet('admin/appearance'); Loading @@ -306,7 +306,7 @@ public function testAdministrationTheme() { // Check that the administration theme is used on an administration page. $this->drupalGet('admin/config'); $this->assertSession()->responseContains('core/themes/seven'); $this->assertSession()->responseContains('core/themes/claro'); // Check that the site default theme used on node page. $this->drupalGet('node/' . $this->node->id()); Loading @@ -314,11 +314,11 @@ public function testAdministrationTheme() { // Check that the administration theme is used on the add content page. $this->drupalGet('node/add'); $this->assertSession()->responseContains('core/themes/seven'); $this->assertSession()->responseContains('core/themes/claro'); // Check that the administration theme is used on the edit content page. $this->drupalGet('node/' . $this->node->id() . '/edit'); $this->assertSession()->responseContains('core/themes/seven'); $this->assertSession()->responseContains('core/themes/claro'); // Disable the admin theme on the node admin pages. $edit = [ Loading @@ -333,7 +333,7 @@ public function testAdministrationTheme() { // Check that the administration theme is used on an administration page. $this->drupalGet('admin/config'); $this->assertSession()->responseContains('core/themes/seven'); $this->assertSession()->responseContains('core/themes/claro'); // Ensure that the admin theme is also visible on the 403 page. $normal_user = $this->drupalCreateUser(['view the administration theme']); Loading @@ -341,7 +341,7 @@ public function testAdministrationTheme() { // Check that the administration theme is used on an administration page. $this->drupalGet('admin/config'); $this->assertSession()->statusCodeEquals(403); $this->assertSession()->responseContains('core/themes/seven'); $this->assertSession()->responseContains('core/themes/claro'); $this->drupalLogin($this->adminUser); // Check that the site default theme used on the add content page. Loading Loading @@ -420,25 +420,24 @@ public function testInvalidTheme() { * Tests uninstalling of themes works. */ public function testUninstallingThemes() { // Install Olivero and set it as the default theme. // Install olivero. \Drupal::service('theme_installer')->install(['olivero']); // Set up seven as the admin theme. \Drupal::service('theme_installer')->install(['seven']); // Set up claro as the admin theme. \Drupal::service('theme_installer')->install(['claro']); $edit = [ 'admin_theme' => 'seven', 'admin_theme' => 'claro', 'use_admin_theme' => TRUE, ]; $this->drupalGet('admin/appearance'); $this->submitForm($edit, 'Save configuration'); $this->drupalGet('admin/appearance'); $this->clickLink('Set as default'); // Check that seven cannot be uninstalled as it is the admin theme. $this->assertSession()->responseNotContains('Uninstall Seven theme'); // Set olivero as the default theme. $this->cssSelect('a[title="Set Olivero as default theme"]')[0]->click(); // Check that claro cannot be uninstalled as it is the admin theme. $this->assertSession()->responseNotContains('Uninstall claro theme'); // Check that olivero cannot be uninstalled as it is the default theme. $this->assertSession()->responseNotContains('Uninstall Olivero theme'); // Check that the classy theme cannot be uninstalled as it is a base theme // of seven and olivero. // of claro and olivero. $this->assertSession()->responseNotContains('Uninstall Classy theme'); // Install Stark and set it as the default theme. Loading @@ -451,8 +450,8 @@ public function testUninstallingThemes() { $this->drupalGet('admin/appearance'); $this->submitForm($edit, 'Save configuration'); // Check that seven can be uninstalled now. $this->assertSession()->responseContains('Uninstall Seven theme'); // Check that claro can be uninstalled now. $this->assertSession()->responseContains('Uninstall claro theme'); // Check that the classy theme still cannot be uninstalled as it is a // base theme of olivero. $this->assertSession()->responseNotContains('Uninstall Classy theme'); Loading @@ -467,12 +466,11 @@ public function testUninstallingThemes() { // base themes have been. $this->assertSession()->responseNotContains('Uninstall Classy theme'); // Uninstall each of the three themes starting with Olivero. $this->clickLink('Uninstall'); // Uninstall each of the two themes starting with Olivero. $this->cssSelect('a[title="Uninstall Olivero theme"]')[0]->click(); $this->assertSession()->responseContains('The <em class="placeholder">Olivero</em> theme has been uninstalled'); // Seven is the second in the list. $this->clickLink('Uninstall'); $this->assertSession()->responseContains('The <em class="placeholder">Seven</em> theme has been uninstalled'); $this->cssSelect('a[title="Uninstall Claro theme"]')[0]->click(); $this->assertSession()->responseContains('The <em class="placeholder">Claro</em> theme has been uninstalled'); // Check that the classy theme still can't be uninstalled as it is hidden. $this->assertSession()->responseNotContains('Uninstall Classy theme'); Loading
core/modules/system/tests/src/Functional/Theme/ThemeTokenTest.php +4 −4 Original line number Diff line number Diff line Loading @@ -46,11 +46,11 @@ public function testThemeToken() { $settings = $this->getDrupalSettings(); $this->assertNull($settings['ajaxPageState']['theme_token']); // Install 'seven' and configure it as administrative theme. $this->container->get('theme_installer')->install(['seven']); $this->config('system.theme')->set('admin', 'seven')->save(); // Install 'claro' and configure it as administrative theme. $this->container->get('theme_installer')->install(['claro']); $this->config('system.theme')->set('admin', 'claro')->save(); // Revisit the page. This time the page is displayed using the 'seven' theme // Revisit the page. This time the page is displayed using the 'claro' theme // and that is different from the default theme ('classy'). $this->drupalGet('admin/structure/block'); $settings = $this->getDrupalSettings(); Loading
core/modules/system/tests/src/Functional/UpdateSystem/BrokenCacheUpdateTest.php +2 −2 Original line number Diff line number Diff line Loading @@ -46,7 +46,7 @@ public function testUpdate() { 'checksum' => 0, ]; $insert->fields($fields); $fields['cid'] = 'element_info_build:seven'; $fields['cid'] = 'element_info_build:claro'; $fields['tags'] = 'element_info_build'; $insert->values(array_values($fields)); $fields['cid'] = 'element_info_build:stark'; Loading @@ -56,7 +56,7 @@ public function testUpdate() { $this->runUpdates(); // Caches should have been cleared at this point. $count = (int) $connection->select('cache_discovery') ->condition('cid', ['element_info', 'element_info_build:seven', 'element_info_build:stark'], 'IN') ->condition('cid', ['element_info', 'element_info_build:claro', 'element_info_build:stark'], 'IN') ->countQuery() ->execute() ->fetchField(); Loading