public function PreserveQueryStringTest::testPreserveQueryString in Redirect 403 to User Login 8
Same name and namespace in other branches
- 2.x tests/src/Functional/PreserveQueryStringTest.php \Drupal\Tests\r4032login\Functional\PreserveQueryStringTest::testPreserveQueryString()
Tests query string preservation.
@dataProvider preserveQueryStringDataProvider
Parameters
string $path: Request path.
array $options: Request options.
int $code: Response status code.
string $destination: Resulting URL.
Throws
\Behat\Mink\Exception\ExpectationException
File
- tests/
src/ Functional/ PreserveQueryStringTest.php, line 35
Class
- PreserveQueryStringTest
- Test that query string is preserved after redirection.
Namespace
Drupal\Tests\r4032login\FunctionalCode
public function testPreserveQueryString($path, array $options, $code, $destination) {
$this
->drupalGet($path, $options);
$this
->assertSession()
->statusCodeEquals($code);
$currentUrl = str_replace($this->baseUrl . '/', '', $this
->getUrl());
$this
->assertEquals($currentUrl, $destination);
}