function LanguageSwitchingTest::testLanguageLinkActiveClass
Same name in other branches
- 8.9.x core/modules/language/tests/src/Functional/LanguageSwitchingTest.php \Drupal\Tests\language\Functional\LanguageSwitchingTest::testLanguageLinkActiveClass()
- 10 core/modules/language/tests/src/Functional/LanguageSwitchingTest.php \Drupal\Tests\language\Functional\LanguageSwitchingTest::testLanguageLinkActiveClass()
- 11.x core/modules/language/tests/src/Functional/LanguageSwitchingTest.php \Drupal\Tests\language\Functional\LanguageSwitchingTest::testLanguageLinkActiveClass()
Tests active class on links when switching languages.
File
-
core/
modules/ language/ tests/ src/ Functional/ LanguageSwitchingTest.php, line 305
Class
- LanguageSwitchingTest
- Functional tests for the language switching feature.
Namespace
Drupal\Tests\language\FunctionalCode
public function testLanguageLinkActiveClass() {
// Add language.
$edit = [
'predefined_langcode' => 'fr',
];
$this->drupalGet('admin/config/regional/language/add');
$this->submitForm($edit, 'Add language');
// Enable URL language detection and selection.
$edit = [
'language_interface[enabled][language-url]' => '1',
];
$this->drupalGet('admin/config/regional/language/detection');
$this->submitForm($edit, 'Save settings');
$this->doTestLanguageLinkActiveClassAuthenticated();
$this->doTestLanguageLinkActiveClassAnonymous();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.