fix tests against PhpUnit 10 refactors

This commit is contained in:
Fabio Ivona
2022-08-25 16:19:22 +02:00
parent c0d66b7dc7
commit a4ec4b2841
5 changed files with 19 additions and 16 deletions

View File

@ -38,8 +38,9 @@ it('allows to call underlying protected/private methods', function () {
});
it('throws error if method do not exist', function () {
test()->name();
})->throws(\ReflectionException::class, 'Call to undefined method PHPUnit\Framework\TestCase::name()');
$user = new User();
$user->foo();
})->throws(Error::class, 'Call to undefined method User::foo()');
it('can forward unexpected calls to any global function')->_assertThat();