You are here

public function ModerationDashboardRedirectTest::testRedirect in Moderation Dashboard 2.0.x

Same name and namespace in other branches
  1. 8 tests/src/Functional/ModerationDashboardRedirectTest.php \Drupal\Tests\moderation_dashboard\Functional\ModerationDashboardRedirectTest::testRedirect()

Tests if login is redirected when the user didn't request another page.

Throws

\Behat\Mink\Exception\ExpectationException

File

tests/src/Functional/ModerationDashboardRedirectTest.php, line 30

Class

ModerationDashboardRedirectTest
Tests redirection to dashboard on login.

Namespace

Drupal\Tests\moderation_dashboard\Functional

Code

public function testRedirect() {
  $this
    ->drupalGet('user/login');
  $this
    ->drupalLogin($this->user);
  $this
    ->assertSession()
    ->addressEquals("user/{$this->user->id()}/moderation-dashboard");
}