Skip to content

Commit 7fde314

Browse files
committed
Add check on the profile
1 parent 05072f0 commit 7fde314

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/Rules/Drupal/Tests/BrowserTestBaseDefaultThemeRule.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,21 @@ public function processNode(Node $node, Scope $scope): array
3939
return [];
4040
}
4141
$defaultProperties = $reflection->getNativeReflection()->getDefaultProperties();
42+
$profile = $defaultProperties['profile'] ?? null;
43+
44+
$testingProfilesWithoutThemes = [
45+
'testing',
46+
'nightwatch_testing',
47+
'testing_config_overrides',
48+
'testing_missing_dependencies',
49+
'testing_multilingual',
50+
'testing_multilingual_with_english',
51+
'testing_requirements',
52+
];
53+
if ($profile !== null && !in_array($profile, $testingProfilesWithoutThemes, true)) {
54+
return [];
55+
}
56+
4257
$defaultTheme = $defaultProperties['defaultTheme'] ?? null;
4358

4459
if ($defaultTheme === null || $defaultTheme === '') {

0 commit comments

Comments
 (0)