Problem/Motivation

We should add defaultTheme where it will be required in tests extending BrowserTestBase.

Drupal\Tests\BrowserTestBase::$defaultTheme is required in drupal:9.0.0 when using an install profile that does not set a default theme. See https://www.drupal.org/node/2352949, which includes recommendations on which theme to use.

See https://www.drupal.org/node/3083055
and https://www.drupal.org/project/drupal/issues/3082655

Proposed resolution

Add the defaultTheme property to tests that extend BrowserTestBase, where appropriate or another theme where appropriate, based on https://www.drupal.org/node/3083055

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

oknate created an issue. See original summary.

rpayanm’s picture

Status: Active » Needs review
FileSize
880 bytes
Berdir’s picture

Status: Needs review » Needs work
+++ b/tests/src/Kernel/CropUnitTestBase.php
@@ -59,6 +59,11 @@ abstract class CropUnitTestBase extends KernelTestBase {
+  /**
+   * {@inheritdoc}
+   */
+  protected $defaultTheme = 'stark';
+
   /**

kernel tests don't need this.

Gnanagowthaman sankar’s picture

Status: Needs work » Needs review

Hi @Berdir,

As you mentioned I made the following changes. Please review and let me know for any changes.

Thanks & Regards,
Gnanagowthaman sankar

Gnanagowthaman sankar’s picture

Patch,

Thanks & Regards,
Gnanagowthaman sankar

Berdir’s picture

Status: Needs review » Needs work

There's still a left-over spaces change now in the kernel test.

AkashKumar07’s picture

Status: Needs work » Needs review
FileSize
444 bytes
Berdir’s picture

Status: Needs review » Reviewed & tested by the community

Thanks.

  • phenaproxima committed e78bd55 on 8.x-2.x
    Issue #3095617 by Gnanagowthaman sankar, AkashkumarOSL, rpayanm, Berdir...
phenaproxima’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.x-2.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.