public function LocaleUpgradePathTestCase::assertPageInLanguage

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

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

... See full list

Archivo

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

Class

LocaleUpgradePathTestCase
Upgrade test for locale.module.

Código

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;
  }
}