You are here

public function RedirectTest::testRedirectAfterLogout in Login Destination 8

Same name and namespace in other branches
  1. 8.2 tests/src/Functional/RedirectTest.php \Drupal\Tests\login_destination\Functional\RedirectTest::testRedirectAfterLogout()

Tests redirecting after logging out.

File

tests/src/Functional/RedirectTest.php, line 334

Class

RedirectTest
Tests redirects.

Namespace

Drupal\Tests\login_destination\Functional

Code

public function testRedirectAfterLogout() {
  $this
    ->createLoginDestinationToNode1([
    LoginDestination::TRIGGER_LOGOUT,
  ]);
  $this
    ->drupalLogin($this->account);
  $this
    ->assertSession()
    ->addressEquals('/user/2');
  $this
    ->drupalLogout();
  $this
    ->assertSession()
    ->statusCodeEquals(200);
  $this
    ->assertSession()
    ->addressEquals('/node/1');
}