function geoipLanguageTestCase::testFrenchLanguageNegotiation in GeoIP API 6
Same name and namespace in other branches
- 7 geoip_language/geoip_language.test \geoipLanguageTestCase::testFrenchLanguageNegotiation()
File
- geoip_language/
geoip_language.test, line 122 - Test suite for geoip_language.module
Class
- geoipLanguageTestCase
- @file Test suite for geoip_language.module
Code
function testFrenchLanguageNegotiation() {
global $base_url, $base_path;
$languages = language_list('language', TRUE);
// FR ip address, should map to fr language and force a redirect. Not using
// url() or any of its derivatives, so as not to taint this url.
$this
->drupalGet($base_url . $base_path . 'node?geoip_debug=81.255.22.101');
$url = url('node', array(
'absolute' => TRUE,
'language' => $languages['fr'],
));
$this
->assertEqual($this
->getUrl(), $url, t('Redirect to french path (%url).', array(
'%url' => $this
->getUrl(),
)));
}