Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Automated tests are failing with Drupal Core 8.8 and later with a deprecation notice:
Drupal\Tests\BrowserTestBase::$defaultTheme is required in drupal:9.0.0 when using an install profile that does not set a default theme. Please see https://www.drupal.org/node/3083055
So, please add to each test class the following property:
+ /**
+ * {@inheritdoc}
+ */
+ protected $defaultTheme = 'stark';
Proposed resolution
Implement a $defaultTheme for the functional tests to resolve the deprecation notice.
Remaining tasks
- Write a patch
- Review
- Commit
User interface changes
None.
API changes
None.
Data model changes
None.
Release notes snippet
None.
Comment | File | Size | Author |
---|---|---|---|
#4 | 3098954-1.patch | 457 bytes | Leonardo Le |
Comments
Comment #2
vuilComment #3
vuilComment #4
Leonardo LeComment #5
Leonardo LeComment #6
vuilI set the issue status Reviewed & tested by the community.
The patch will be committed.
Thank you Leonardo Le!
Comment #7
vuilI added the parent issue #3082507: Test for Drupal 9 deprecations
Comment #9
vuilThe patch is committed! Thank you.