You are here

public function LanguageAccessTest::testDisableDefaultLanguage in Language access 8

Test that disabling the default language works.

File

tests/src/Functional/LanguageAccessTest.php, line 48

Class

LanguageAccessTest
Test language access on the frontend.

Namespace

Drupal\Tests\language_access\Functional

Code

public function testDisableDefaultLanguage() : void {
  $this
    ->drupalLogin($this->userNl);
  $this
    ->drupalGet('en/node/1');
  $this
    ->assertSession()
    ->statusCodeEquals(403);
  $this
    ->drupalGet('nl/node/1');
  $this
    ->assertSession()
    ->statusCodeEquals(200);
}