| @@ 65-84 (lines=20) @@ | ||
| 62 | /** |
|
| 63 | * @test |
|
| 64 | */ |
|
| 65 | public function itReturnsASingleCard() |
|
| 66 | { |
|
| 67 | $this->bunqClient->get('/v1/user/1/card/1')->willReturn( |
|
| 68 | [ |
|
| 69 | 'Response' => [ |
|
| 70 | [ |
|
| 71 | 'id' => 1, |
|
| 72 | ], |
|
| 73 | ], |
|
| 74 | ] |
|
| 75 | ); |
|
| 76 | ||
| 77 | $result = $this->resource->getCard(1, 1); |
|
| 78 | ||
| 79 | $expectedResult = [ |
|
| 80 | 'id' => 1, |
|
| 81 | ]; |
|
| 82 | ||
| 83 | $this->assertEquals($expectedResult, $result); |
|
| 84 | } |
|
| 85 | } |
|
| 86 | ||
| 87 | ||
| @@ 69-90 (lines=22) @@ | ||
| 66 | /** |
|
| 67 | * @test |
|
| 68 | */ |
|
| 69 | public function itGivesASingleMonetaryAccount() |
|
| 70 | { |
|
| 71 | $this->bunqClient->get('/v1/user/1/monetary-account/1')->willReturn( |
|
| 72 | [ |
|
| 73 | 'Response' => [ |
|
| 74 | [ |
|
| 75 | 'MonetaryAccountBank' => [ |
|
| 76 | 'id' => 1, |
|
| 77 | ], |
|
| 78 | ], |
|
| 79 | ], |
|
| 80 | ] |
|
| 81 | ); |
|
| 82 | ||
| 83 | $result = $this->resource->getMonetaryAccount(1, 1); |
|
| 84 | ||
| 85 | $expectedResult = [ |
|
| 86 | 'id' => 1, |
|
| 87 | ]; |
|
| 88 | ||
| 89 | $this->assertEquals($expectedResult, $result); |
|
| 90 | } |
|
| 91 | } |
|
| 92 | ||
| 93 | ||
| @@ 63-84 (lines=22) @@ | ||
| 60 | /** |
|
| 61 | * @test |
|
| 62 | */ |
|
| 63 | public function itReturnsASingleUser() |
|
| 64 | { |
|
| 65 | $this->bunqClient->get('/v1/user/1')->willReturn( |
|
| 66 | [ |
|
| 67 | 'Response' => [ |
|
| 68 | [ |
|
| 69 | 'UserCompany' => [ |
|
| 70 | 'id' => 1, |
|
| 71 | ], |
|
| 72 | ], |
|
| 73 | ], |
|
| 74 | ] |
|
| 75 | ); |
|
| 76 | ||
| 77 | $result = $this->resource->getUser(1); |
|
| 78 | ||
| 79 | $expectedResult = [ |
|
| 80 | 'id' => 1, |
|
| 81 | ]; |
|
| 82 | ||
| 83 | $this->assertEquals($expectedResult, $result); |
|
| 84 | } |
|
| 85 | } |
|
| 86 | ||
| 87 | ||