silverstripe-framework/tests/GeoipTest.php
Will Rossiter 573acaed89 FEATURE: added Geoip::set_default_country_code() to set fall back country (thanks ronan). ENHANCEMENT: added set_enabled() and is_enabled() to Geoip to allow disabling of Geoip lookups. (Fixes #4452)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@115157 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-12-17 01:30:48 +00:00

11 lines
216 B
PHP

<?php
class GeoipTest extends SapphireTest {
function testSetDefaultCountry() {
Geoip::set_default_country_code('DE');
Geoip::set_enabled(false);
$this->assertEquals('DE', Geoip::visitor_country());
}
}