LocaleLanguageNegotiationInfoFunctionalTest::languageNegotiationUpdate

7 locale.test private LocaleLanguageNegotiationInfoFunctionalTest::languageNegotiationUpdate($op = 'enable')
8 locale.test protected LocaleLanguageNegotiationInfoFunctionalTest::languageNegotiationUpdate($op = 'enable')

Update language types/negotiation information.

Manually invoke locale_modules_enabled()/locale_modules_disabled() since they would not be invoked after enabling/disabling locale_test the first time.

File

modules/locale/locale.test, line 2980
Tests for locale.module.

Code

private function languageNegotiationUpdate($op = 'enable') {
  static $last_op = NULL;
  $modules = array('locale_test');

  // Enable/disable locale_test only if we did not already before.
  if ($last_op != $op) {
    $function = "module_{$op}";
    $function($modules);
    // Reset hook implementation cache.
    module_implements(NULL, FALSE, TRUE);
  }

  drupal_static_reset('language_types_info');
  drupal_static_reset('language_negotiation_info');
  $function = "locale_modules_{$op}d";
  if (function_exists($function)) {
    $function($modules);
  }

  $this->drupalGet('admin/config/regional/language/configure');
}
Login or register to post comments