public function LocaleUpgradePathTestCase::assertPageInLanguage

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

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

File

drupal/modules/simpletest/tests/upgrade/upgrade.locale.test, line 127

Class

LocaleUpgradePathTestCase
Upgrade test for locale.module.

Code

public function assertPageInLanguage($path = NULL, $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;
  }
}