Commit f030a0de authored by Ben Mullins's avatar Ben Mullins
Browse files

Issue #3307454 by Spokje, lauriii: Move classy related tests to the theme...

Issue #3307454 by Spokje, lauriii: Move classy related tests to the theme directory/namespace or handle them otherwise
parent 05204a62
Loading
Loading
Loading
Loading
+0 −13
Original line number Diff line number Diff line
@@ -438,9 +438,6 @@ public function testUninstallingThemes() {
    $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 claro and olivero.
    $this->assertSession()->responseNotContains('Uninstall Classy theme');

    // Install Stark and set it as the default theme.
    \Drupal::service('theme_installer')->install(['stark']);
@@ -454,9 +451,6 @@ public function testUninstallingThemes() {

    // 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');

    // Change the default theme to stark, stark is second in the list.
    $this->clickLink('Set as default', 1);
@@ -464,18 +458,11 @@ public function testUninstallingThemes() {
    // Check that olivero can be uninstalled now.
    $this->assertSession()->responseContains('Uninstall Olivero theme');

    // Check that the classy theme still can't be uninstalled as neither of its
    // base themes have been.
    $this->assertSession()->responseNotContains('Uninstall Classy theme');

    // 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');
    $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');
  }

  /**
+1 −0
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@
 * location.
 *
 * @group Theme
 * @group legacy
 */
class ConfirmClassyCopiesTest extends KernelTestBase {

+3 −0
Original line number Diff line number Diff line
@@ -8,6 +8,9 @@
 * Confirms that classy.theme has not added new functionality.
 *
 * @group Theme
 * @group legacy
 *
 * @todo Remove in https://www.drupal.org/project/drupal/issues/3110137
 */
class ClassyPreprocessUnchangedTest extends UnitTestCase {

+3 −0
Original line number Diff line number Diff line
@@ -8,6 +8,9 @@
 * Confirms that certain Classy templates have identical equivalents in Stable.
 *
 * @group Theme
 * @group legacy
 *
 * @todo Remove in https://www.drupal.org/project/drupal/issues/3110137
 */
class ClassyTemplatesIdenticalToStableTest extends UnitTestCase {

+1 −1
Original line number Diff line number Diff line
<?php

namespace Drupal\FunctionalTests\Theme;
namespace Drupal\Tests\classy\Functional;

use Drupal\Tests\BrowserTestBase;

Loading