private function LocaleLanguageNegotiationInfoFunctionalTest::languageNegotiationUpdate

7.x locale.test private 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.

1 call to LocaleLanguageNegotiationInfoFunctionalTest::languageNegotiationUpdate()
LocaleLanguageNegotiationInfoFunctionalTest::testInfoAlterations in drupal-7.x/modules/locale/locale.test
Tests alterations to language types/negotiation info.

File

drupal-7.x/modules/locale/locale.test, line 3058
Tests for locale.module.

Class

LocaleLanguageNegotiationInfoFunctionalTest
Functional test for language types/negotiation info.

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