mirror of
https://github.com/pestphp/pest.git
synced 2026-03-11 10:17:23 +01:00
forward bad TestCase method calls to global functions
This commit is contained in:
@ -244,6 +244,7 @@
|
||||
✓ it throws error if property do not exist
|
||||
✓ it allows to call underlying protected/private methods
|
||||
✓ it throws error if method do not exist
|
||||
✓ it can forward unexpected calls to any global function
|
||||
|
||||
PASS Tests\Features\HigherOrderTests
|
||||
✓ it proxies calls to object
|
||||
@ -352,5 +353,5 @@
|
||||
✓ depends with defined arguments
|
||||
✓ depends run test only once
|
||||
|
||||
Tests: 6 skipped, 207 passed
|
||||
Tests: 6 skipped, 208 passed
|
||||
|
||||
@ -22,3 +22,8 @@ trait SecondPluginTrait
|
||||
|
||||
Pest\Plugin::uses(PluginTrait::class);
|
||||
Pest\Plugin::uses(SecondPluginTrait::class);
|
||||
|
||||
function _assertThat()
|
||||
{
|
||||
expect(true)->toBeTrue();
|
||||
}
|
||||
|
||||
@ -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();
|
||||
|
||||
Reference in New Issue
Block a user