Conditions | 1 |
Paths | 1 |
Total Lines | 28 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
26 | public function testGetCity(): void |
||
27 | { |
||
28 | $rawResponse = <<<'EOD' |
||
29 | { |
||
30 | "id" : "5357527", |
||
31 | "name" : "Hollywood", |
||
32 | "stateCode" : "CA", |
||
33 | "state" : "California", |
||
34 | "coords" : { |
||
35 | "long" : -118.3267434, |
||
36 | "lat" : 34.0983425 |
||
37 | }, |
||
38 | "country" : { |
||
39 | "code" : "US", |
||
40 | "name" : "United States" |
||
41 | } |
||
42 | } |
||
43 | EOD; |
||
44 | |||
45 | $this->connection->call('city/5357527') |
||
46 | ->willReturn(json_decode($rawResponse, true)) |
||
47 | ; |
||
48 | |||
49 | $service = new CityService($this->connection->reveal()); |
||
50 | $result = $service->getCity(5357527); |
||
51 | |||
52 | static::assertNotNull($result); |
||
53 | } |
||
54 | |||
90 |