1 locale.test protected LocaleUILanguageNegotiationTest::runTest($test)

File

core/modules/locale/tests/locale.test, line 2244
Tests for locale.module.

Class

LocaleUILanguageNegotiationTest
Test UI language negotiation

Code

protected function runTest($test) {
  if (!empty($test['language_negotiation'])) {
    language_negotiation_set(LANGUAGE_TYPE_INTERFACE, $test['language_negotiation']);
  }
  if (!empty($test['language_negotiation_url_part'])) {
    config_set('locale.settings', 'language_negotiation_url_part', $test['language_negotiation_url_part']);
  }
  if (!empty($test['locale_test_domain'])) {
    state_set('locale_test_domain', $test['locale_test_domain']);
  }
  $this->backdropGet($test['path'], array(), $test['http_header']);
  $this->assertText($test['expect'], $test['message']);
  $this->assertText(t('Language negotiation provider: @name', array('@name' => $test['expected_provider'])));
}