public function ToolbarLanguageSwitcherTest::testMultipleLanguagesProjectSetup 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::testMultipleLanguagesProjectSetup()
- 2.0.x tests/src/Functional/ToolbarLanguageSwitcherTest.php \Drupal\Tests\toolbar_language_switcher\Functional\ToolbarLanguageSwitcherTest::testMultipleLanguagesProjectSetup()
Test multiple languages project setup.
File
- tests/
src/ Functional/ ToolbarLanguageSwitcherTest.php, line 87
Class
- ToolbarLanguageSwitcherTest
- Base test class for toolbar_language_switcher tests.
Namespace
Drupal\Tests\toolbar_language_switcher\FunctionalCode
public function testMultipleLanguagesProjectSetup() {
$languages = [
'xx' => 'Lolspeak1',
'zz' => 'Lolspeak2',
];
$this
->installLanguages($languages);
$front_page = Url::fromRoute('<front>');
$assert_session = $this
->assertSession();
$this
->drupalLogin($this->user);
$this
->drupalGet($front_page);
foreach ($languages as $title) {
$assert_session
->linkExists($title);
}
}