forward bad TestCase method calls to global functions

This commit is contained in:
Félix Dorn
2020-08-25 13:45:55 +02:00
parent fe885fbfb6
commit 278af4b835
4 changed files with 16 additions and 1 deletions

View File

@ -40,3 +40,5 @@ 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()');
it('can forward unexpected calls to any global function')->_assertThat();