mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 07:47:22 +01:00
16 lines
214 B
PHP
16 lines
214 B
PHP
<?php
|
|
|
|
interface Foo
|
|
{
|
|
public function bar(): int;
|
|
}
|
|
|
|
it('has bar', function () {
|
|
$mock = mock(Foo::class);
|
|
$mock->shouldReceive('bar')
|
|
->times(1)
|
|
->andReturn(2);
|
|
|
|
$mock->bar();
|
|
});
|