diff --git a/src/Factories/TestCaseFactory.php b/src/Factories/TestCaseFactory.php index 42c3ca6e..bc75f5c1 100644 --- a/src/Factories/TestCaseFactory.php +++ b/src/Factories/TestCaseFactory.php @@ -144,8 +144,8 @@ final class TestCaseFactory * @return mixed */ $test = function () use ($chains, $proxies, $factoryTest) { - $chains->chain($this); $proxies->proxy($this); + $chains->chain($this); /* @phpstan-ignore-next-line */ return call_user_func(Closure::bind($factoryTest, $this, get_class($this)), ...func_get_args()); diff --git a/tests/Features/Exceptions.php b/tests/Features/Exceptions.php index 22d9d4ea..9970c2a9 100644 --- a/tests/Features/Exceptions.php +++ b/tests/Features/Exceptions.php @@ -1,7 +1,5 @@ expectException(InvalidArgumentException::class); @@ -39,7 +37,3 @@ it('can just define the message if given condition is true', function () { it('can just define the message if given condition is 1', function () { throw new Exception('Something bad happened'); })->throwsIf(1, 'Something bad happened'); - -it('can handle a skipped test if it is trying to catch an exception', function () { - expect(1)->toBe(2); -})->throws(ExpectationFailedException::class)->skip('this test should be skipped')->only();