function LocaleUpgradePathTestCase::assertPageInLanguage

Asserts that a page exists and is in the specified language.

4 calls to LocaleUpgradePathTestCase::assertPageInLanguage()
LocaleUpgradePathTestCase::testLocaleUpgrade in modules/simpletest/tests/upgrade/upgrade.locale.test
Test a successful upgrade (no negotiation).
LocaleUpgradePathTestCase::testLocaleUpgradeDomain in modules/simpletest/tests/upgrade/upgrade.locale.test
Test an upgrade with domain-based negotiation.
LocaleUpgradePathTestCase::testLocaleUpgradePathDefault in modules/simpletest/tests/upgrade/upgrade.locale.test
Test an upgrade with path-based negotiation.
LocaleUpgradePathTestCase::testLocaleUpgradePathFallback in modules/simpletest/tests/upgrade/upgrade.locale.test
Test an upgrade with path-based (with fallback) negotiation.

File

modules/simpletest/tests/upgrade/upgrade.locale.test, line 139

Class

LocaleUpgradePathTestCase
Upgrade test for locale.module.

Code

public function assertPageInLanguage($path, $langcode) {
    if (isset($path)) {
        $this->drupalGet($path);
    }
    if (!$this->assertResponse(200)) {
        return FALSE;
    }
    if ($this->parse()) {
        return $this->assertIdentical($langcode, (string) $this->elements['xml:lang']);
    }
    else {
        return FALSE;
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.