protected function I18nBookNavigationTestBase::enableLanguages in Book translation 7.2
Enable languages.
Parameters
array $languages: Each item should be a language code.
2 calls to I18nBookNavigationTestBase::enableLanguages()
- I18nBookNavigationTestBase::setUp in tests/
i18n_book_navigation.test - Sets up a Drupal site for running functional and integration tests.
- I18nBookNavigationTestCase::testIssue1619026 in tests/
i18n_book_navigation.test - Regression test for [#1619026].
File
- tests/
i18n_book_navigation.test, line 51 - Unit tests for the Book translation module.
Class
- I18nBookNavigationTestBase
- @file Unit tests for the Book translation module.
Code
protected function enableLanguages($languages) {
foreach ($languages as $language) {
$edit = array(
'langcode' => $language,
);
$this
->drupalPost('admin/config/regional/language/add', $edit, t("Add language"));
}
}