Drupal\Tests\BrowserTestBase::$defaultTheme is required.

Created on 17 April 2023, about 2 years ago
Updated 10 May 2023, about 2 years ago

Problem/Motivation

After analyzing a custom module via the web UI i get this output:

modules/custom/my_custom_module/tests/src/Functional/MyTest.php 13 Drupal\Tests\BrowserTestBase::$defaultTheme is required. See https://www.drupal.org/node/3083055, which includes recommendations on which theme to use.

Steps to reproduce

Installed via composer require 'composer require 'drupal/upgrade_status:^4.0'.
Go to the admin page, check a custom module, run scan.

Some context on the installed packages:

drupal/core: 9.5.7
drupal/core-dev: ^9.0.0
phpstan/phpstan: 0.12.55

PHP : 8.1

I set $defaultTheme as 'stark' using TRAIT (installDefaultThemeFromClassProperty) for my test, and its picking up the correct theme and TEST is PASSING successfully without any issue but on upgrade-status scanning it is assuming this as error or problem. Any thoughts or suggestions here would be much appriciated !!!

Thanks

🐛 Bug report
Status

Active

Version

4.0

Component

User interface

Created by

🇮🇳India Sana.Neyazi

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024