Verified Commit cadfbb39 authored by Lee Rowlands's avatar Lee Rowlands
Browse files

task: #3622600 Remove remaining uses of Olivero in tests

By: quietone
By: godotislate
By: daffie
By: gábor hojtsy
parent f57a99d2
Loading
Loading
Loading
Loading
+2 −0
Changes for core/modules/block/tests/src/Kernel/Migrate/d6/MigrateBlockTest.php: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -8,12 +8,14 @@
use Drupal\block\Hook\BlockHooks;
use Drupal\Tests\migrate_drupal\Kernel\d6\MigrateDrupal6TestBase;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\IgnoreDeprecations;
use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;

/**
 * Tests migration of blocks to configuration entities.
 */
#[Group('migrate_drupal_6')]
#[IgnoreDeprecations]
#[RunTestsInSeparateProcesses]
class MigrateBlockTest extends MigrateDrupal6TestBase {

+2 −0
Changes for core/modules/block/tests/src/Kernel/Migrate/d7/MigrateBlockNoBlockContentTest.php: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -8,12 +8,14 @@
use Drupal\block\Hook\BlockHooks;
use Drupal\Tests\migrate_drupal\Kernel\d7\MigrateDrupal7TestBase;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\IgnoreDeprecations;
use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;

/**
 * Tests the migration of blocks without Block Content installed.
 */
#[Group('block')]
#[IgnoreDeprecations]
#[RunTestsInSeparateProcesses]
class MigrateBlockNoBlockContentTest extends MigrateDrupal7TestBase {

+2 −0
Changes for core/modules/block/tests/src/Kernel/Migrate/d7/MigrateBlockTest.php: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -9,12 +9,14 @@
use Drupal\block_content\Entity\BlockContent;
use Drupal\Tests\migrate_drupal\Kernel\d7\MigrateDrupal7TestBase;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\IgnoreDeprecations;
use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;

/**
 * Tests migration of blocks to configuration entities.
 */
#[Group('block')]
#[IgnoreDeprecations]
#[RunTestsInSeparateProcesses]
class MigrateBlockTest extends MigrateDrupal7TestBase {

+3 −2
Changes for core/modules/comment/tests/src/Functional/CommentDisplayConfigurableTest.php: 3 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@ class CommentDisplayConfigurableTest extends CommentTestBase {
  /**
   * {@inheritdoc}
   */
  protected $defaultTheme = 'olivero';
  protected $defaultTheme = 'claro';

  /**
   * {@inheritdoc}
@@ -60,7 +60,8 @@ public function testDisplayConfigurable(): void {

    // Check the comment author with Drupal default non-configurable display.
    $this->drupalGet('node/' . $nid);
    $assert->elementExists('css', 'p.comment__author span');
    $display_name = $this->webUser->getDisplayName();
    $assert->responseContains("Submitted by <span>$display_name</span>");

    // Enable module to make base fields' displays configurable.
    \Drupal::service('module_installer')->install(['comment_display_configurable_test']);
+12 −11
Changes for core/modules/locale/tests/src/Functional/LocaleThemeInstallTest.php: 12 added lines, 11 removed lines.
Original line number Diff line number Diff line
@@ -54,27 +54,28 @@ protected function setUp(): void {
  /**
   * Tests that installing a theme via the UI updates config language.
   *
   * The olivero theme ships core.date_format.olivero_medium with langcode
   * 'en'. With locale enabled and a non-English site default, that langcode
   * should be rewritten to the site default after the install batch runs.
   * The locale_test_config_langcode test theme provides
   * core.date_format.locale_test_config_langcode_medium with langcode 'en'.
   * With locale enabled and a non-English site default, that langcode should be
   * rewritten to the site default after the install batch runs.
   */
  public function testThemeInstallRewritesConfigLangcode(): void {
    // Install olivero via the Appearance UI.
    // Install locale_test_config_langcode via the Appearance UI.
    $this->drupalGet('admin/appearance');
    $this->cssSelect('a[title="Install Olivero theme"]')[0]->click();
    $this->cssSelect('a[title="Install locale_test_config_langcode theme"]')[0]->click();
    // The ThemeController redirects to the batch page; follow its meta-refresh
    // chain to process all batch operations before asserting config state.
    $this->checkForMetaRefresh();
    $this->rebuildContainer();

    // core.date_format.olivero_medium ships with langcode 'en'. Locale's
    // core.date_format.locale_test_config_langcode_medium ships with langcode 'en'. Locale's
    // updateDefaultConfigLangcodes() should have rewritten it to 'de'.
    $langcode = $this->config('core.date_format.olivero_medium')->get('langcode');
    $langcode = $this->config('core.date_format.locale_test_config_langcode_medium')->get('langcode');
    $this->assertSame('de', $langcode);

    // Ensure that the theme is installed.
    $this->assertSession()->addressEquals('admin/appearance');
    $this->assertSession()->pageTextContains('The Olivero theme has been installed.');
    $this->assertSession()->pageTextContains('The locale_test_config_langcode theme has been installed.');
  }

  /**
@@ -82,13 +83,13 @@ public function testThemeInstallRewritesConfigLangcode(): void {
   */
  public function testThemeSetDefaultRewritesConfigLangcode(): void {
    $this->drupalGet('admin/appearance');
    $this->cssSelect('a[title="Install Olivero as default theme"]')[0]->click();
    $this->cssSelect('a[title="Install locale_test_config_langcode as default theme"]')[0]->click();
    $this->checkForMetaRefresh();
    $this->rebuildContainer();
    $langcode = $this->config('core.date_format.olivero_medium')->get('langcode');
    $langcode = $this->config('core.date_format.locale_test_config_langcode_medium')->get('langcode');
    $this->assertSame('de', $langcode);
    $this->assertSession()->addressEquals('admin/appearance');
    $this->assertSession()->pageTextContains('Olivero is now the default theme.');
    $this->assertSession()->pageTextContains('locale_test_config_langcode is now the default theme.');
  }

}
Loading