Skip to content

Commit

Permalink
Fix codeception issue #4888 (#19)
Browse files Browse the repository at this point in the history
edno authored and DavertMik committed Mar 31, 2018

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 42c8fdb commit b3d16b1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/FilterTest.php
Original file line number Diff line number Diff line change
@@ -28,6 +28,13 @@ public function accept():bool

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

// This fix the issue when an invalid dataprovider method generate a warning
// See issue https://github.com/Codeception/Codeception/issues/4888
if($test instanceof \PHPUnit\Framework\WarningTestCase) {
$message = $test->getMessage();
$accepted = preg_match($this->filter, $message, $matches);
}

if ($accepted && isset($this->filterMax)) {
$set = end($matches);
$accepted = $set >= $this->filterMin && $set <= $this->filterMax;

0 comments on commit b3d16b1

Please sign in to comment.