mirror of
https://github.com/pestphp/pest.git
synced 2026-03-08 08:47:22 +01:00
implemented support for PHPUnit's @depends
This commit is contained in:
@ -18,10 +18,10 @@ final class ExceptionTrace
|
||||
* Ensures the given closure reports
|
||||
* the good execution context.
|
||||
*/
|
||||
public static function ensure(Closure $closure): void
|
||||
public static function ensure(Closure $closure): Mixed
|
||||
{
|
||||
try {
|
||||
$closure();
|
||||
return new Mixed($closure());
|
||||
} catch (Throwable $throwable) {
|
||||
if (Str::startsWith($message = $throwable->getMessage(), self::UNDEFINED_METHOD)) {
|
||||
$message = str_replace(self::UNDEFINED_METHOD, 'Call to undefined method ', $message);
|
||||
|
||||
Reference in New Issue
Block a user