mirror of
https://github.com/pestphp/pest.git
synced 2026-04-26 08:57:26 +02:00
feat(helpers): adds helpers file
This commit is contained in:
@ -6,7 +6,7 @@ interface Foo
|
||||
}
|
||||
|
||||
it('has bar', function () {
|
||||
$mock = Mockery::mock(Foo::class);
|
||||
$mock = mock(Foo::class);
|
||||
$mock->shouldReceive('bar')
|
||||
->times(1)
|
||||
->andReturn(2);
|
||||
|
||||
8
tests/Helpers.php
Normal file
8
tests/Helpers.php
Normal file
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
use Mockery\MockInterface;
|
||||
|
||||
function mock(string $class): MockInterface
|
||||
{
|
||||
return Mockery::mock($class);
|
||||
}
|
||||
Reference in New Issue
Block a user