We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d970cba commit 326dfddCopy full SHA for 326dfdd
tests/Mockery/MockeryTest.php
@@ -95,6 +95,15 @@ public function testMockWithMethods(): void
95
self::assertSame('foo', $fooMock->doFoo());
96
}
97
98
+ public function testMockShouldAllowMockingProtectedMethods(): void
99
+ {
100
+ $fooMock = \Mockery::mock(Foo::class)->shouldAllowMockingProtectedMethods();
101
+ $this->requireFoo($fooMock);
102
+
103
+ $fooMock->shouldReceive('doFoo')->once()->andReturn('bar');
104
+ self::assertSame('bar', $fooMock->doFoo());
105
+ }
106
107
public function testMakePartial(): void
108
{
109
$fooMock = \Mockery::mock(Foo::class)->makePartial();
0 commit comments