File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,8 @@ class MockeryBarTest extends MockeryTestCase
12
12
13
13
protected function setUp (): void
14
14
{
15
+ parent ::setUp ();
16
+
15
17
$ this ->fooMock = \Mockery::mock (Foo::class);
16
18
}
17
19
@@ -36,9 +38,17 @@ public function testExpectationMethodsAreCalled(): void
36
38
self ::assertSame ('foo ' , $ bar ->doFoo ());
37
39
}
38
40
39
- public function testShouldNotReceive (): void
41
+ public function testShouldNotReceiveAndHaveReceived (): void
40
42
{
41
43
$ this ->fooMock ->shouldNotReceive ('doFoo ' )->andReturn ('bar ' );
44
+ $ this ->fooMock ->shouldNotHaveReceived ('doFoo ' );
45
+ }
46
+
47
+ public function testShouldReceiveAndHaveReceived (): void
48
+ {
49
+ $ this ->fooMock ->shouldReceive ('doFoo ' )->andReturn ('bar ' );
50
+ self ::assertSame ('bar ' , $ this ->fooMock ->doFoo ());
51
+ $ this ->fooMock ->shouldHaveReceived ('doFoo ' );
42
52
}
43
53
44
54
}
You can’t perform that action at this time.
0 commit comments