Conditions | 1 |
Paths | 1 |
Total Lines | 30 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
31 | public function itReturnsAListOfCards() |
||
32 | { |
||
33 | $this->bunqClient->get('/v1/user/1/card')->willReturn( |
||
|
|||
34 | [ |
||
35 | 'Response' => [ |
||
36 | [ |
||
37 | 'id' => 1, |
||
38 | ], |
||
39 | [ |
||
40 | 'id' => 2, |
||
41 | ], |
||
42 | ], |
||
43 | ] |
||
44 | ); |
||
45 | |||
46 | $result = $this->resource->listCards(1); |
||
47 | |||
48 | $expectedResult = [ |
||
49 | 'Response' => [ |
||
50 | [ |
||
51 | 'id' => 1, |
||
52 | ], |
||
53 | [ |
||
54 | 'id' => 2, |
||
55 | ], |
||
56 | ], |
||
57 | ]; |
||
58 | |||
59 | $this->assertEquals($expectedResult, $result); |
||
60 | } |
||
61 | |||
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: