function LanguageSwitchingTest::testLanguageLinkActiveClass in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/language/src/Tests/LanguageSwitchingTest.php \Drupal\language\Tests\LanguageSwitchingTest::testLanguageLinkActiveClass()
Test active class on links when switching languages.
File
- core/
modules/ language/ src/ Tests/ LanguageSwitchingTest.php, line 229 - Contains \Drupal\language\Tests\LanguageSwitchingTest.
Class
- LanguageSwitchingTest
- Functional tests for the language switching feature.
Namespace
Drupal\language\TestsCode
function testLanguageLinkActiveClass() {
// Add language.
$edit = array(
'predefined_langcode' => 'fr',
);
$this
->drupalPostForm('admin/config/regional/language/add', $edit, t('Add language'));
// Enable URL language detection and selection.
$edit = array(
'language_interface[enabled][language-url]' => '1',
);
$this
->drupalPostForm('admin/config/regional/language/detection', $edit, t('Save settings'));
$this
->doTestLanguageLinkActiveClassAuthenticated();
$this
->doTestLanguageLinkActiveClassAnonymous();
}