function LocaleLanguageNegotiationInfoFunctionalTest::checkFixedLanguageTypes

Check that language negotiation for fixed types matches the stored one.

1 call to LocaleLanguageNegotiationInfoFunctionalTest::checkFixedLanguageTypes()
LocaleLanguageNegotiationInfoFunctionalTest::testInfoAlterations in modules/locale/locale.test
Tests alterations to language types/negotiation info.

File

modules/locale/locale.test, line 3218

Class

LocaleLanguageNegotiationInfoFunctionalTest
Functional test for language types/negotiation info.

Code

private function checkFixedLanguageTypes() {
  drupal_static_reset('language_types_info');
  foreach (language_types_info() as $type => $info) {
    if (isset($info['fixed'])) {
      $negotiation = variable_get("language_negotiation_{$type}", array());
      $equal = array_keys($negotiation) === array_values($info['fixed']);
      $this->assertTrue($equal, format_string('language negotiation for %type is properly set up', array(
        '%type' => $type,
      )));
    }
  }
}

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