diff --git a/tests/Features/Helpers.php b/tests/Features/Helpers.php index 1116f995..ee34702e 100644 --- a/tests/Features/Helpers.php +++ b/tests/Features/Helpers.php @@ -38,9 +38,8 @@ it('allows to call underlying protected/private methods', function () { }); it('throws error if method do not exist', function () { - $user = new User(); - $user->foo(); -})->throws(Error::class, 'Call to undefined method User::foo()'); + test()->foo(); +})->throws(\ReflectionException::class, 'Call to undefined method PHPUnit\Framework\TestCase::foo()'); it('can forward unexpected calls to any global function')->_assertThat();