feat(mock): updates tests

This commit is contained in:
Nuno Maduro
2021-05-15 01:02:58 +01:00
parent 7023cec432
commit 88dc74bbe4

View File

@ -16,6 +16,14 @@ it('can mock methods', function () {
expect($mock->get())->toBe('foo');
})->skip(((float) phpversion()) < 8.0);
it('can access to arguments', function () {
$mock = mock(Http::class)->expect(
get: fn ($foo) => $foo,
);
expect($mock->get('foo'))->toBe('foo');
})->skip(((float) phpversion()) < 8.0);
it('allows access to the underlying mockery mock', function () {
$mock = mock(Http::class);