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