Files
pest/tests/Features/Mocks.php
2020-06-11 21:56:15 +02:00

18 lines
240 B
PHP

<?php
use function Tests\mock;
interface Foo
{
public function bar(): int;
}
it('has bar', function () {
$mock = mock(Foo::class);
$mock->shouldReceive('bar')
->times(1)
->andReturn(2);
$mock->bar();
});