Skip to content

Commit

Permalink
Add test for method declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
bbatsche authored and ondrejmirtes committed Jul 19, 2019
1 parent a013b23 commit 5aee3dc
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/Mockery/MockeryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,15 @@ public function testMockWithInterfaceAndConstructorArgs(): void
self::assertSame('bar', $fooMock->doFoo());
}

public function testMockWithMethods(): void
{
$fooMock = \Mockery::mock(Foo::class . '[doFoo]');
$this->requireFoo($fooMock);

$fooMock->allows()->doFoo()->andReturns('foo');
self::assertSame('foo', $fooMock->doFoo());
}

private function requireFoo(Foo $foo): void
{
}
Expand Down

0 comments on commit 5aee3dc

Please sign in to comment.