From 7e146d871dd476e59301f51036e4f9b53b7fbfdf Mon Sep 17 00:00:00 2001 From: Romain d'Alverny Date: Fri, 11 May 2012 10:10:21 +0000 Subject: new & updated tests for downloads section --- lib/t/01_mga_geoip.t | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'lib/t/01_mga_geoip.t') diff --git a/lib/t/01_mga_geoip.t b/lib/t/01_mga_geoip.t index a33a708a7..aa3daa674 100644 --- a/lib/t/01_mga_geoip.t +++ b/lib/t/01_mga_geoip.t @@ -8,6 +8,9 @@ plan('no_plan'); diag('Testing mga_geoip_* functions against defined IP/locations.'); $ips = array( + '46.33.75.17' + => array('DE', 'EU'), + '2a01:e35:8a03:9990:223:dfff:fe7e:e7f0' => array('FR', 'EU'), @@ -15,14 +18,12 @@ $ips = array( => array('IE', 'EU'), '173.194.67.99' - => array('US', 'NA'), - - '46.33.75.17' - => array('DE', 'EU') + => array('US', 'NA') ); foreach ($ips as $ip => $cc) { - is($country = mga_geoip_country_by_ip($ip, false), $cc[0], 'country match for ' . $ip); - is(mga_geoip_continent_by_country($country), $cc[1], 'continent match for ' . $ip); -} + $country = MGA_Geoip::mga_geoip_country_by_ip($ip, false); + is($country, $cc[0], 'country match for ' . $ip); + is(MGA_Geoip::mga_geoip_continent_by_country($country), $cc[1], 'continent match for ' . $ip); +} -- cgit v1.2.1