fixes filter

This commit is contained in:
Nuno Maduro
2024-08-12 00:46:31 +01:00
parent ce4495b093
commit 7ef40760c2
3 changed files with 9 additions and 4 deletions

View File

@ -45,6 +45,7 @@ declare(strict_types=1);
namespace PHPUnit\Runner\Filter;
use Pest\Contracts\HasPrintableTestCaseName;
use PHPUnit\Framework\Test;
use PHPUnit\Framework\TestSuite;
use PHPUnit\Runner\PhptTestCase;
@ -97,7 +98,11 @@ abstract class NameFilterIterator extends RecursiveFilterIterator
return false;
}
$name = $test::class.'::'.$test->nameWithDataSet();
if ($test instanceof HasPrintableTestCaseName) {
$name = $test::getPrintableTestCaseName().'::'.$test->getPrintableTestCaseMethodName();
} else {
$name = $test::class.'::'.$test->nameWithDataSet();
}
$accepted = @preg_match($this->regularExpression, $name, $matches) === 1;

View File

@ -6,7 +6,7 @@ namespace Pest;
function version(): string
{
return '3.0.0-beta-2';
return '3.0.0-beta-3';
}
function testDirectory(string $file = ''): string

View File

@ -1076,8 +1076,8 @@
! a "describe" group of tests → notice → This is a notice description // tests/Features/Notices.php:11
PASS Tests\Features\Pr
✓ it may be associated with an pr #2
✓ nested → it may be associated with an pr #3
✓ it may be associated with an pr #1, #2
✓ nested → it may be associated with an pr #1, #4, #5, #6, #3
// an note between an the pr
PASS Tests\Features\Repeat