mirror of
https://github.com/pestphp/pest.git
synced 2026-03-09 01:07:23 +01:00
Uses Collision ^7.0
This commit is contained in:
@ -91,7 +91,6 @@ final class TestCaseMethodFactory
|
||||
|
||||
return function () use ($testCase, $method, $closure): mixed { // @phpstan-ignore-line
|
||||
/* @var TestCase $this */
|
||||
|
||||
$testCase->proxies->proxy($this);
|
||||
$method->proxies->proxy($this);
|
||||
|
||||
@ -148,28 +147,29 @@ final class TestCaseMethodFactory
|
||||
}
|
||||
|
||||
$annotations = implode('', array_map(
|
||||
static fn ($annotation) => sprintf("\n * %s", $annotation), $annotations,
|
||||
static fn ($annotation) => sprintf("\n * %s", $annotation), $annotations,
|
||||
));
|
||||
|
||||
$attributes = implode('', array_map(
|
||||
static fn ($attribute) => sprintf("\n %s", $attribute), $attributes,
|
||||
));
|
||||
|
||||
return <<<EOF
|
||||
return <<<PHP
|
||||
|
||||
/**$annotations
|
||||
*/
|
||||
$attributes
|
||||
public function $methodName()
|
||||
{
|
||||
\$test = \Pest\TestSuite::getInstance()->tests->get(self::\$__filename)->getMethod(\$this->name())->getClosure(\$this);
|
||||
|
||||
return \$this->__runTest(
|
||||
\$this->__test,
|
||||
\$test,
|
||||
...func_get_args(),
|
||||
);
|
||||
}
|
||||
|
||||
$datasetsCode
|
||||
EOF;
|
||||
PHP;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user