mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 15:57:21 +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');
|
||||
})->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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user