public function LanguageAccessTest::testLanguageSwitchingBlock in Language access 8
Test that the language switching block only shows the allowed languages.
File
- tests/
src/ Functional/ LanguageAccessTest.php, line 77
Class
- LanguageAccessTest
- Test language access on the frontend.
Namespace
Drupal\Tests\language_access\FunctionalCode
public function testLanguageSwitchingBlock() : void {
$this
->drupalLogin($this->userEn);
$this
->drupalGet('<front>');
$this
->assertSession()
->linkExists('English');
$this
->assertSession()
->linkNotExists('Dutch');
$this
->drupalLogin($this->userNl);
$this
->drupalGet('<front>');
$this
->assertSession()
->linkNotExists('English');
$this
->assertSession()
->linkExists('Dutch');
}