mirror of
https://github.com/pestphp/pest.git
synced 2026-03-11 18:27:23 +01:00
feat(mock): updates tests
This commit is contained in:
@ -16,6 +16,14 @@ it('can mock methods', function () {
|
|||||||
expect($mock->get())->toBe('foo');
|
expect($mock->get())->toBe('foo');
|
||||||
})->skip(((float) phpversion()) < 8.0);
|
})->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 () {
|
it('allows access to the underlying mockery mock', function () {
|
||||||
$mock = mock(Http::class);
|
$mock = mock(Http::class);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user