Problem/Motivation
Most of the test classes under core/modules/file/tests/src/Functional are derived from either FileFieldTestBase
or FileManagedTestBase
. Both of those define their own static $modules
array.
However, when we did #3082655: Specify the $defaultTheme property in all functional tests we didn't notice this fact, and put separate $defaultTheme
definitions in all the children.
3 of them apparently depended on classy markup, so those set defaultTheme to classy. Everything else uses stark.
In addition to being duplicate code in most cases, these hunks can cause otherwise backportable test changes / additions to require separate patches for different branches, which is a minor hassle and creates more work for ourselves.
Proposed resolution
- Put
protected $defaultTheme = 'stark';
in the parent test classes. - Remove that from (almost) all the child classes.
- Let the 3 tests that (apparently) need 'classy' to continue to override
$defaultTheme
themselves.
Remaining tasks
- Do it.
- Make sure we didn't break anything.
- Review.
- RTBC.
- Commit.
User interface changes
-
API changes
None. Tests aren't API.
Data model changes
-
Release notes snippet
-