public function ToolbarLanguageSwitcherTest::installLanguages in Admin Toolbar Language Switcher 8
Same name and namespace in other branches
- 8.1.x tests/src/Functional/ToolbarLanguageSwitcherTest.php \Drupal\Tests\toolbar_language_switcher\Functional\ToolbarLanguageSwitcherTest::installLanguages()
- 2.0.x tests/src/Functional/ToolbarLanguageSwitcherTest.php \Drupal\Tests\toolbar_language_switcher\Functional\ToolbarLanguageSwitcherTest::installLanguages()
Throws
\Drupal\Core\Entity\EntityStorageException
3 calls to ToolbarLanguageSwitcherTest::installLanguages()
- ToolbarLanguageSwitcherTest::testMultipleLanguagesProjectSetup in tests/
src/ Functional/ ToolbarLanguageSwitcherTest.php - Test multiple languages project setup.
- ToolbarLanguageSwitcherTest::testNotRenderedForTheForbiddenUser in tests/
src/ Functional/ ToolbarLanguageSwitcherTest.php - Test use use toolbar_language_switcher permission.
- ToolbarLanguageSwitcherTest::testTwoLanguagesProjectSetup in tests/
src/ Functional/ ToolbarLanguageSwitcherTest.php - Test two languages project setup.
File
- tests/
src/ Functional/ ToolbarLanguageSwitcherTest.php, line 126
Class
- ToolbarLanguageSwitcherTest
- Base test class for toolbar_language_switcher tests.
Namespace
Drupal\Tests\toolbar_language_switcher\FunctionalCode
public function installLanguages($languages) {
foreach ($languages as $langcode) {
$language = ConfigurableLanguage::createFromLangcode($langcode);
$language
->save();
}
}