Change record status: 
Project: 
Introduced in branch: 
8.8.x
Introduced in version: 
8.8.0
Description: 

The testing install profile is used by default in functional tests (BrowserTestBase & WebDriverTestBase and their deprecated predecessors WebTestBase and JavascriptTestBase). That install profile installs the classy theme and configures it as the default theme. This was supposed to be temporary (introduced in #2350823: Use the Classy theme in the Testing profile), but ended up becoming the norm.

This caused a multitude of problems:

  1. classy may change in future major releases of Drupal → breakage
  2. classy may not exist in future major releases of Drupal → breakage
  3. some bugfixes require changes to the underlying theme, but since classy cannot be changed in minor or patch releases, the bugfix is impossible to land

That's why as of Drupal 8.8, tests using the testing install profile (which is the default) will be required to specify which theme they're testing. The same is true for any other install profile that does not specify a default theme (i.e. that does not come with system.theme config with a value for the default key).

Existing tests which the developer doesn't want to update assertions for
Add:
  protected $defaultTheme = 'classy';
RECOMMENDED Existing tests which the developer wishes to update assertions for to minimize future change
For tests relying on no markup at all or at least no core markup (⚠️ This is strongly recommended: avoiding coupling tests to markup whenever possible makes those tests more robust! ⚠️):
  protected $defaultTheme = 'stark';

For tests relying on core markup:

  protected $defaultTheme = 'stable';
New tests
For tests relying on no markup at all or at least no core markup:
  protected $defaultTheme = 'stark';

For tests relying on core markup:

  protected $defaultTheme = 'stable';
Impacts: 
Module developers