Skip to content

Commit 91b710e

Browse files
committed
Merge pull request #124 from magento-tango/MAGETWO-34198
[Tango] MAGETWO-34198
2 parents 670849f + 970263a commit 91b710e

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

dev/tests/static/testsuite/Magento/Test/Integrity/ClassesTest.php

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -534,9 +534,16 @@ public function testCoversAnnotation()
534534
$errors = [];
535535
foreach ($files->getFiles([BP . '/dev/tests/{integration,unit}'], '*') as $file) {
536536
$code = file_get_contents($file);
537-
if (preg_match('/@covers(DefaultClass)?\s+([\w\\\\]+)(::([\w\\\\]+))?/', $code, $matches)) {
538-
if ($this->isNonexistentEntityCovered($matches)) {
539-
$errors[] = $file . ': ' . $matches[0];
537+
if (preg_match_all(
538+
'/@covers(DefaultClass)?\s+([\w\\\\]+)(::([\w\\\\]+))?/',
539+
$code,
540+
$matchesAll,
541+
PREG_SET_ORDER
542+
)) {
543+
foreach ($matchesAll as $matches) {
544+
if ($this->isNonexistentEntityCovered($matches)) {
545+
$errors[] = $file . ': ' . $matches[0];
546+
}
540547
}
541548
}
542549
}

0 commit comments

Comments
 (0)