Conditions | 1 |
Paths | 1 |
Total Lines | 17 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
16 | public function testGetGeoInfo() |
||
17 | { |
||
18 | $data = [ |
||
19 | "continent_name" => "test", |
||
20 | "country_name" => "test", |
||
21 | "region_name" => "test", |
||
22 | "city" => "test", |
||
23 | "zip" => "test" |
||
24 | ]; |
||
25 | |||
26 | $curl = new \EVB\Weather\MockCurlWrapper(\json_encode($data)); |
||
27 | |||
28 | $sut = new IpLocator("test", $curl); |
||
29 | |||
30 | $result = $sut->getGeoInfo("test"); |
||
31 | |||
32 | $this->assertEquals($data, $result); |
||
33 | } |
||
35 |