Testing currently produces the following deprecation warning:

12x: 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/3083055, which includes recommendations on which theme to use.

Test classes that extend BrowserTestBase or WebDriverTestBase now need to specify a $defaultTheme. Previously there was an implicit default theme 'classy' but it is recommended to use 'stark', and adjust any failing test assertions where necessary.

Issue: #2352949: Deprecate using Classy as the default theme for the 'testing' profile
Change record: https://www.drupal.org/node/3083055

CommentFileSizeAuthor
#2 3098110-2.add-default-theme.patch492 bytesjonathan1055

Comments

jonathan1055 created an issue. See original summary.

jonathan1055’s picture

Status: Active » Needs review
StatusFileSize
new492 bytes

Patch to add 'stark' as the $defaultTheme.
In local testing at core 8.8 the 12x deprecation message is no longer shown.

  • TR committed ef6be0a on 8.x-3.x authored by jonathan1055
    Issue #3098110 by jonathan1055: Deprecation: add $defaultTheme to...
tr’s picture

Status: Needs review » Fixed

Committed. Thanks.

jonathan1055’s picture

Nice that no assertions had to be modified. I've done this $defaultTheme addition on two other modules and both needed some tests altering due to using css selectors which were in 'classy' but not 'stark'.

Status: Fixed » Closed (fixed)

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

jonathan1055’s picture

Assigned: jonathan1055 » Unassigned

Unassigning