mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 15:57:21 +01:00
first
This commit is contained in:
15
tests/Features/Mocks.php
Normal file
15
tests/Features/Mocks.php
Normal file
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
interface Foo
|
||||
{
|
||||
public function bar(): int;
|
||||
}
|
||||
|
||||
it('has bar', function () {
|
||||
$mock = Mockery::mock(Foo::class);
|
||||
$mock->shouldReceive('bar')
|
||||
->times(1)
|
||||
->andReturn(2);
|
||||
|
||||
assertEquals(2, $mock->bar());
|
||||
});
|
||||
Reference in New Issue
Block a user