Skip to content

Commit

Permalink
test: add failing test case for phpstan#8
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-feek committed Aug 13, 2019
1 parent 5aee3dc commit e87ea77
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/Mockery/MockeryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,16 @@ public function testMockWithMethods(): void
self::assertSame('foo', $fooMock->doFoo());
}

public function testMockChaining(): void
{
$fooMock = \Mockery::mock(Foo::class, Buzz::class, [true]);
$this->requireFoo($fooMock);
$this->requireBuzz($fooMock);

$fooMock->shouldReceive('doFoo')->andReturn('bar')->shouldReceive('doFoo')->andReturn('bar');
self::assertSame('bar', $fooMock->doFoo());
}

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

0 comments on commit e87ea77

Please sign in to comment.