Skip to content

Commit ae30a72

Browse files
msvrtanondrejmirtes
authored andcommitted
Add expects test
1 parent 645a0d8 commit ae30a72

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/Mockery/MockeryTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,15 @@ public function testCreatedMock(): void
2222
self::assertSame('foo', $fooMock->doFoo());
2323
}
2424

25+
public function testExpectsMock(): void
26+
{
27+
$fooMock = \Mockery::mock(Foo::class);
28+
$this->requireFoo($fooMock);
29+
30+
$fooMock->expects()->doFoo()->andReturns('foo');
31+
self::assertSame('foo', $fooMock->doFoo());
32+
}
33+
2534
public function testAnotherMockTest(): void
2635
{
2736
$fooMock = \Mockery::mock(Foo::class);

0 commit comments

Comments
 (0)