mirror of
https://github.com/pestphp/pest.git
synced 2026-03-07 16:27:23 +01:00
feat: pr and issue
This commit is contained in:
27
src/TestCaseMethodFilters/IssueTestCaseFilter.php
Normal file
27
src/TestCaseMethodFilters/IssueTestCaseFilter.php
Normal file
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Pest\TestCaseMethodFilters;
|
||||
|
||||
use Pest\Contracts\TestCaseMethodFilter;
|
||||
use Pest\Factories\TestCaseMethodFactory;
|
||||
|
||||
final readonly class IssueTestCaseFilter 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->issues, true);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user