public function LocaleUpgradePathTestCase::testLocaleUpgradePathDefault
Test an upgrade with path-based negotiation.
Archivo
- drupal-7.x/
modules/ simpletest/ tests/ upgrade/ upgrade.locale.test, line 45
Class
- LocaleUpgradePathTestCase
- Upgrade test for locale.module.
Código
public function testLocaleUpgradePathDefault() {
// LANGUAGE_NEGOTIATION_PATH_DEFAULT.
$this->variable_set('language_negotiation', 1);
$this->assertTrue($this->performUpgrade(), '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', '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');
}