public function BaseRedirectTest::testBaseRedirect in Redirect 403 to User Login 2.x
Same name and namespace in other branches
- 8 tests/src/Functional/BaseRedirectTest.php \Drupal\Tests\r4032login\Functional\BaseRedirectTest::testBaseRedirect()
Test the base redirection behavior.
@dataProvider baseRedirectDataProvider
Parameters
string $path: Request path.
int $code: Response status code.
string $destination: Resulting URL.
Throws
\Behat\Mink\Exception\ExpectationException
File
- tests/
src/ Functional/ BaseRedirectTest.php, line 38
Class
- BaseRedirectTest
- Test normal redirection from 403 to login page.
Namespace
Drupal\Tests\r4032login\FunctionalCode
public function testBaseRedirect($path, $code, $destination) {
$this
->drupalGet($path);
$this
->assertSession()
->statusCodeEquals($code);
$this
->assertSession()
->addressEquals($destination);
}