Permalink
Browse files

MDL-48766 tests: move from Liberec to Cambridge

(liberec ip seemed to have been identified as a new location nearby now,
hoping cambridge will be stable)
  • Loading branch information...
danpoltawski committed Sep 15, 2016
1 parent 0ddc7e5 commit c307689792de46868319f63b3a9d2aa9ceee9763
Showing with 12 additions and 12 deletions.
  1. +6 −6 iplookup/tests/geoip_test.php
  2. +6 −6 iplookup/tests/geoplugin_test.php
@@ -82,16 +82,16 @@ public function setUp() {
public function test_ipv4() {
$result = iplookup_find_location('147.230.16.1');
$result = iplookup_find_location('131.111.150.25');
$this->assertEquals('array', gettype($result));
$this->assertEquals('Liberec', $result['city']);
$this->assertEquals(15.0653, $result['longitude'], '', 0.001);
$this->assertEquals(50.7639, $result['latitude'], '', 0.001);
$this->assertEquals('Cambridge', $result['city']);
$this->assertEquals(0.1249, $result['longitude'], '', 0.001);
$this->assertEquals(52.191000000000003, $result['latitude'], '', 0.001);
$this->assertNull($result['error']);
$this->assertEquals('array', gettype($result['title']));
$this->assertEquals('Liberec', $result['title'][0]);
$this->assertEquals('Czech Republic', $result['title'][1]);
$this->assertEquals('Cambridge', $result['title'][0]);
$this->assertEquals('United Kingdom', $result['title'][1]);
}
public function test_ipv6() {
@@ -47,16 +47,16 @@ public function setUp() {
}
public function test_geoip_ipv4() {
$result = iplookup_find_location('147.230.16.1');
$result = iplookup_find_location('131.111.150.25');
$this->assertEquals('array', gettype($result));
$this->assertEquals('Liberec', $result['city']);
$this->assertEquals(15.0653, $result['longitude'], '', 0.001);
$this->assertEquals(50.7639, $result['latitude'], '', 0.001);
$this->assertEquals('Cambridge', $result['city']);
$this->assertEquals(0.1167, $result['longitude'], '', 0.001);
$this->assertEquals(52.200000000000003, $result['latitude'], '', 0.001);
$this->assertNull($result['error']);
$this->assertEquals('array', gettype($result['title']));
$this->assertEquals('Liberec', $result['title'][0]);
$this->assertEquals('Czech Republic', $result['title'][1]);
$this->assertEquals('Cambridge', $result['title'][0]);
$this->assertEquals('United Kingdom', $result['title'][1]);
}
public function test_geoip_ipv6() {

0 comments on commit c307689

Please sign in to comment.