mirror of
https://github.com/pestphp/pest.git
synced 2026-03-07 00:07:22 +01:00
28 lines
551 B
PHP
28 lines
551 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Pest\TestCaseMethodFilters;
|
|
|
|
use Pest\Contracts\TestCaseMethodFilter;
|
|
use Pest\Factories\TestCaseMethodFactory;
|
|
|
|
final readonly class PrTestCaseFilter implements TestCaseMethodFilter
|
|
{
|
|
/**
|
|
* Create a new filter instance.
|
|
*/
|
|
public function __construct(private int $number)
|
|
{
|
|
//
|
|
}
|
|
|
|
/**
|
|
* Filter the test case methods.
|
|
*/
|
|
public function accept(TestCaseMethodFactory $factory): bool
|
|
{
|
|
return in_array($this->number, $factory->prs, true);
|
|
}
|
|
}
|