| 7 upgrade.locale.test | public LocaleUpgradePathTestCase::testLocaleUpgradePathDefault() |
Test an upgrade with path-based negotiation.
File
- modules/
simpletest/ tests/ upgrade/ upgrade.locale.test, line 45
Code
public function testLocaleUpgradePathDefault() {
// LANGUAGE_NEGOTIATION_PATH_DEFAULT.
$this->variable_set('language_negotiation', 1);
$this->assertTrue($this->performUpgrade(), t('The upgrade was completed successfully.'));
// The home page should be in French.
$this->assertPageInLanguage('', 'fr');
// The language switcher block should be displayed.
$this->assertRaw('block-locale-language', t('The language switcher block is displayed.'));
// The French prefix should not be active because French is the default language.
$this->drupalGet('fr');
$this->assertResponse(404);
// The English prefix should be active.
$this->assertPageInLanguage('en', 'en');
}
Login or register to post comments