You are here

function LanguageHierarchyPathsFunctionalTest::addLanguagesWithHierarchy in Language Hierarchy 7

Add each language via the UI

1 call to LanguageHierarchyPathsFunctionalTest::addLanguagesWithHierarchy()
LanguageHierarchyPathsFunctionalTest::createAdminUserAndLanguages in modules/language_hierarchy_paths/language_hierarchy_paths.test
Set up admin user and languages.

File

modules/language_hierarchy_paths/language_hierarchy_paths.test, line 177
Tests for language_hierarchy_paths.module.

Class

LanguageHierarchyPathsFunctionalTest
Functional tests for configuring a different path alias per language.

Code

function addLanguagesWithHierarchy($languages) {
  foreach ($languages as $langcode => $edit) {
    $edit += array(
      'langcode' => $langcode,
      'direction' => '0',
      // The domain prefix.
      'prefix' => $langcode,
    );
    $this
      ->drupalPost('admin/config/regional/language/add', $edit, t('Add custom language'));
  }
}