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

Fix issue codeception/codeception#4888 (7.0) #19

Merged
merged 1 commit into from
Mar 31, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/FilterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down