We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 670849f + 970263a commit 91b710eCopy full SHA for 91b710e
dev/tests/static/testsuite/Magento/Test/Integrity/ClassesTest.php
@@ -534,9 +534,16 @@ public function testCoversAnnotation()
534
$errors = [];
535
foreach ($files->getFiles([BP . '/dev/tests/{integration,unit}'], '*') as $file) {
536
$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];
+ if (preg_match_all(
+ '/@covers(DefaultClass)?\s+([\w\\\\]+)(::([\w\\\\]+))?/',
+ $code,
540
+ $matchesAll,
541
+ PREG_SET_ORDER
542
+ )) {
543
+ foreach ($matchesAll as $matches) {
544
+ if ($this->isNonexistentEntityCovered($matches)) {
545
+ $errors[] = $file . ': ' . $matches[0];
546
+ }
547
}
548
549
0 commit comments