mirror of
https://github.com/pestphp/pest.git
synced 2026-03-12 10:47:25 +01:00
added missing return types
This commit is contained in:
@ -129,12 +129,21 @@ trait TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Runs the test.
|
* Runs the test.
|
||||||
|
*
|
||||||
|
* @return mixed
|
||||||
|
*
|
||||||
|
* @throws \Throwable
|
||||||
*/
|
*/
|
||||||
public function __test()
|
public function __test()
|
||||||
{
|
{
|
||||||
return $this->__callClosure($this->__test, func_get_args());
|
return $this->__callClosure($this->__test, func_get_args());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return mixed
|
||||||
|
*
|
||||||
|
* @throws \Throwable
|
||||||
|
*/
|
||||||
private function __callClosure(Closure $closure, array $arguments)
|
private function __callClosure(Closure $closure, array $arguments)
|
||||||
{
|
{
|
||||||
return ExceptionTrace::ensure(function () use ($closure, $arguments) {
|
return ExceptionTrace::ensure(function () use ($closure, $arguments) {
|
||||||
|
|||||||
@ -132,6 +132,9 @@ final class TestCaseFactory
|
|||||||
$proxies = $this->proxies;
|
$proxies = $this->proxies;
|
||||||
$factoryTest = $this->test;
|
$factoryTest = $this->test;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
$test = function () use ($chains, $proxies, $factoryTest) {
|
$test = function () use ($chains, $proxies, $factoryTest) {
|
||||||
$proxies->proxy($this);
|
$proxies->proxy($this);
|
||||||
$chains->chain($this);
|
$chains->chain($this);
|
||||||
|
|||||||
@ -17,6 +17,10 @@ final class ExceptionTrace
|
|||||||
/**
|
/**
|
||||||
* Ensures the given closure reports
|
* Ensures the given closure reports
|
||||||
* the good execution context.
|
* the good execution context.
|
||||||
|
*
|
||||||
|
* @return mixed
|
||||||
|
*
|
||||||
|
* @throws \Throwable
|
||||||
*/
|
*/
|
||||||
public static function ensure(Closure $closure)
|
public static function ensure(Closure $closure)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user