Conditions | 1 |
Paths | 1 |
Total Lines | 28 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
31 | public function itReturnsAListOfUsers() |
||
32 | { |
||
33 | $this->bunqClient->get('/v1/user')->willReturn( |
||
|
|||
34 | [ |
||
35 | 'Response' => [ |
||
36 | [ |
||
37 | 'UserCompany' => [ |
||
38 | 'id' => 1, |
||
39 | ], |
||
40 | ], |
||
41 | ], |
||
42 | ] |
||
43 | ); |
||
44 | |||
45 | $result = $this->resource->listUsers(); |
||
46 | |||
47 | $expectedResult = [ |
||
48 | 'Response' => [ |
||
49 | [ |
||
50 | 'UserCompany' => [ |
||
51 | 'id' => 1, |
||
52 | ], |
||
53 | ], |
||
54 | ], |
||
55 | ]; |
||
56 | |||
57 | $this->assertEquals($expectedResult, $result); |
||
58 | } |
||
59 | |||
87 |
It seems like the method you are trying to call exists only in some of the possible types.
Let’s take a look at an example:
Available Fixes
Add an additional type-check:
Only allow a single type to be passed if the variable comes from a parameter: