Skip to content
This repository was archived by the owner on Mar 12, 2025. It is now read-only.

Commit b3d16b1

Browse files
ednoDavertMik
authored andcommitted
Fix codeception issue #4888 (#19)
1 parent 42c8fdb commit b3d16b1

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/FilterTest.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@ public function accept():bool
2828

2929
$accepted = preg_match($this->filter, $name, $matches);
3030

31+
// This fix the issue when an invalid dataprovider method generate a warning
32+
// See issue https://github.com/Codeception/Codeception/issues/4888
33+
if($test instanceof \PHPUnit\Framework\WarningTestCase) {
34+
$message = $test->getMessage();
35+
$accepted = preg_match($this->filter, $message, $matches);
36+
}
37+
3138
if ($accepted && isset($this->filterMax)) {
3239
$set = end($matches);
3340
$accepted = $set >= $this->filterMin && $set <= $this->filterMax;

0 commit comments

Comments
 (0)