Skip to content

Commit 0b4e3ff

Browse files
committed
tests(phpunit): fix cc config
1 parent 6f31afc commit 0b4e3ff

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
],
9595
"test:cc": [
9696
"@putenv XDEBUG_MODE=coverage",
97-
"phpunit --coverage-clover=.build/phpunit/logs/clover.xml --color=always"
97+
"phpunit --coverage-clover=runtime/phpunit/logs/clover.xml --color=always"
9898
]
9999
}
100100
}

phpunit.xml.dist

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
executionOrder="random"
1010
stderr="true"
1111
beStrictAboutOutputDuringTests="true"
12+
displayDetailsOnTestsThatTriggerWarnings="true"
1213
>
1314
<testsuites>
1415
<testsuite name="Unit">
@@ -23,9 +24,9 @@
2324
</testsuites>
2425
<coverage>
2526
<report>
26-
<html outputDirectory="runtime/coverage"/>
27-
<text outputFile="runtime/coverage.txt"/>
28-
<clover outputFile="runtime/logs/clover.xml"/>
27+
<html outputDirectory="runtime/phpunit/coverage"/>
28+
<text outputFile="runtime/phpunit/coverage.txt"/>
29+
<clover outputFile="runtime/phpunit/logs/clover.xml"/>
2930
</report>
3031
</coverage>
3132
<logging>

src/Module/Repository/Collection/AssetsCollection.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,11 @@ static function (AssetInterface $asset) use ($extensions): bool {
103103
public function whereNameMatches(string $pattern): self
104104
{
105105
return $this->filter(
106-
static fn(AssetInterface $asset): bool => \preg_match($pattern, $asset->getName()) === 1,
106+
static fn(AssetInterface $asset): bool => \preg_match(
107+
$pattern,
108+
$asset->getName(),
109+
flags: \PREG_NO_ERROR,
110+
) === 1,
107111
);
108112
}
109113
}

0 commit comments

Comments
 (0)