Conditions | 1 |
Paths | 1 |
Total Lines | 23 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
32 | public function testSearch(): void |
||
33 | { |
||
34 | $rawResponse = <<<'EOD' |
||
35 | { |
||
36 | "country" : [ { |
||
37 | "code" : "US", |
||
38 | "name" : "United States" |
||
39 | }], |
||
40 | "total" : 1, |
||
41 | "page" : 1, |
||
42 | "itemsPerPage" : 20 |
||
43 | } |
||
44 | EOD; |
||
45 | |||
46 | $this->connection->call('search/countries') |
||
47 | ->willReturn(json_decode($rawResponse, true)) |
||
48 | ; |
||
49 | |||
50 | $service = new CountryService($this->connection->reveal()); |
||
51 | $result = $service->search(); |
||
52 | |||
53 | $this->assertCount(1, $result); |
||
54 | } |
||
55 | } |
||
56 |