Skip to content

Commit 314c222

Browse files
committed
Merge remote-tracking branch 'l3/MC-40791' into SEARCH-1968-static-test-check-dependencies
2 parents e816892 + cba0c4e commit 314c222

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

dev/tests/static/testsuite/Magento/Test/Legacy/LegacyFixtureTest.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,15 @@ public function testNew(): void
2727
$legacyFixtureFiles = [];
2828
foreach ($files as $file) {
2929
if (pathinfo($file, PATHINFO_EXTENSION) === 'php'
30-
&& preg_match('/(Test|integration\/testsuite|api-functional\/testsuite).*\/(_files|Fixtures)/', $file)
30+
&& (
31+
preg_match('/(integration\/testsuite|api-functional\/testsuite).*\/(_files|Fixtures)/', $file)
32+
// Cover the case when tests are located in the module folder instead of dev/tests.
33+
// for instance inventory
34+
|| (
35+
strpos($file, 'dev/tests/') === false
36+
&& preg_match('/app\/code\/.*\/Test.*\/(_files|Fixtures)/', $file)
37+
)
38+
)
3139
) {
3240
$legacyFixtureFiles[] = str_replace(BP . '/', '', $file);
3341
}

0 commit comments

Comments
 (0)