mirror of
https://github.com/pestphp/pest.git
synced 2026-03-07 00:07:22 +01:00
feat(describe): refactor
This commit is contained in:
@ -22,45 +22,45 @@ final class TestCaseMethodFactory
|
||||
use HigherOrderable;
|
||||
|
||||
/**
|
||||
* D=fghjkl
|
||||
* The test's describing, if any.
|
||||
*/
|
||||
public ?string $describing = null;
|
||||
|
||||
/**
|
||||
* Determines if the Test Case Method is a "todo".
|
||||
* Determines if the test is a "todo".
|
||||
*/
|
||||
public bool $todo = false;
|
||||
|
||||
/**
|
||||
* The Test Case Dataset, if any.
|
||||
* The test's datasets.
|
||||
*
|
||||
* @var array<Closure|iterable<int|string, mixed>|string>
|
||||
*/
|
||||
public array $datasets = [];
|
||||
|
||||
/**
|
||||
* The Test Case depends, if any.
|
||||
* The test's dependencies.
|
||||
*
|
||||
* @var array<int, string>
|
||||
*/
|
||||
public array $depends = [];
|
||||
|
||||
/**
|
||||
* The Test Case groups, if any.
|
||||
* The test's groups.
|
||||
*
|
||||
* @var array<int, string>
|
||||
*/
|
||||
public array $groups = [];
|
||||
|
||||
/**
|
||||
* The covered classes and functions, if any.
|
||||
* The covered classes and functions.
|
||||
*
|
||||
* @var array<int, \Pest\Factories\Covers\CoversClass|\Pest\Factories\Covers\CoversFunction|\Pest\Factories\Covers\CoversNothing>
|
||||
*/
|
||||
public array $covers = [];
|
||||
|
||||
/**
|
||||
* Creates a new Factory instance.
|
||||
* Creates a new test case method factory instance.
|
||||
*/
|
||||
public function __construct(
|
||||
public string $filename,
|
||||
@ -75,7 +75,7 @@ final class TestCaseMethodFactory
|
||||
}
|
||||
|
||||
/**
|
||||
* Makes the Test Case classes.
|
||||
* Creates the test's closure.
|
||||
*/
|
||||
public function getClosure(TestCase $concrete): Closure
|
||||
{
|
||||
@ -89,7 +89,6 @@ final class TestCaseMethodFactory
|
||||
|
||||
$testCase = TestSuite::getInstance()->tests->get($this->filename);
|
||||
|
||||
$concrete->__describeDescription = $this->describing; // @phpstan-ignore-line
|
||||
$testCase->factoryProxies->proxy($concrete);
|
||||
$this->factoryProxies->proxy($concrete);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user