File tree 2 files changed +9
-2
lines changed
2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ interface MockInterface
6
6
{
7
7
8
8
/**
9
- * @param string[] ...$methodNames
9
+ * @param string|array<string, mixed> ...$methodNames
10
10
* @return Expectation
11
11
*/
12
12
public function shouldReceive(...$methodNames);
@@ -22,7 +22,7 @@ interface LegacyMockInterface
22
22
{
23
23
24
24
/**
25
- * @param string[] ...$methodNames
25
+ * @param string|array<string, mixed> ...$methodNames
26
26
* @return Expectation
27
27
*/
28
28
public function shouldReceive(...$methodNames);
Original file line number Diff line number Diff line change @@ -38,6 +38,13 @@ public function testAnotherMockTest(): void
38
38
self ::assertSame ('bar ' , $ fooMock ->doFoo ());
39
39
}
40
40
41
+ public function testAlternativeMockTest (): void
42
+ {
43
+ $ fooMock = \Mockery::mock (Foo::class);
44
+ $ fooMock ->shouldReceive (['doFoo ' => 'bar ' ]);
45
+ self ::assertSame ('bar ' , $ fooMock ->doFoo ());
46
+ }
47
+
41
48
public function testMockFromProperty (): void
42
49
{
43
50
$ this ->requireFoo ($ this ->fooMock );
You can’t perform that action at this time.
0 commit comments