public function ModerationDashboardRedirectTest::testNoRedirect in Moderation Dashboard 8
Same name and namespace in other branches
- 2.0.x tests/src/Functional/ModerationDashboardRedirectTest.php \Drupal\Tests\moderation_dashboard\Functional\ModerationDashboardRedirectTest::testNoRedirect()
Tests if login is not redirected when the user requested another page.
File
- tests/
src/ Functional/ ModerationDashboardRedirectTest.php, line 40
Class
- ModerationDashboardRedirectTest
- Tests redirection to dashboard on login.
Namespace
Drupal\Tests\moderation_dashboard\FunctionalCode
public function testNoRedirect() {
// Anonymous user is redirected to login screen.
// After successful login the requested page is shown.
$this
->drupalGet('admin/content');
$this
->submitForm([
'name' => $this->user
->getDisplayName(),
'pass' => $this->user->passRaw,
], t('Log in'));
$this
->assertSession()
->addressEquals('admin/content');
}