You are here

public function RedirectOnLoginTest::testDisabled in Moderation Dashboard 8

Same name and namespace in other branches
  1. 2.0.x tests/src/Functional/RedirectOnLoginTest.php \Drupal\Tests\moderation_dashboard\Functional\RedirectOnLoginTest::testDisabled()

Tests disabled redirect on login.

File

tests/src/Functional/RedirectOnLoginTest.php, line 27

Class

RedirectOnLoginTest
Tests redirect on login configuration.

Namespace

Drupal\Tests\moderation_dashboard\Functional

Code

public function testDisabled() {

  // Set redirect to disabled.
  $this
    ->config('moderation_dashboard.settings')
    ->set('redirect_on_login', FALSE)
    ->save();

  // User is not redirected.
  $this
    ->drupalLogin($this->user);
  $this
    ->assertSession()
    ->addressEquals("user/{$this->user->id()}");
}