You are here

function EntityTranslationTestCase::enableUrlLanguageDetection in Entity Translation 7

Enable URL language detection.

7 calls to EntityTranslationTestCase::enableUrlLanguageDetection()
EntityTranslationCommentTestCase::setUp in tests/entity_translation.test
Sets up a Drupal site for running functional and integration tests.
EntityTranslationContentTranslationTestCase::setUp in tests/entity_translation.test
Sets up a Drupal site for running functional and integration tests.
EntityTranslationIntegrationTestCase::setUp in tests/entity_translation.test
Sets up a Drupal site for running functional and integration tests.
EntityTranslationMenuTranslationTestCase::setUp in entity_translation_i18n_menu/entity_translation_i18n_menu.test
Sets up a Drupal site for running functional and integration tests.
EntityTranslationTaxonomyAutocompleteTestCase::setUp in tests/entity_translation.test
Sets up a Drupal site for running functional and integration tests.

... See full list

File

tests/entity_translation.test, line 112
Tests for Entity translation module.

Class

EntityTranslationTestCase
Base class for entity translation module tests.

Code

function enableUrlLanguageDetection() {

  // Enable URL language detection and selection.
  $edit = array(
    'language[enabled][locale-url]' => TRUE,
    'language_content[enabled][locale-interface]' => TRUE,
  );
  $this
    ->drupalPost('admin/config/regional/language/configure', $edit, t('Save settings'));
  $this
    ->assertRaw(t('Language negotiation configuration saved.'), t('URL language detection enabled.'));
  $this
    ->drupalGet('admin/config/regional/language/configure');

  // Reset caches.
  drupal_static_reset('locale_url_outbound_alter');
  drupal_static_reset('language_list');
}