protected function CasGatewayAuthSubscriberTest::getExpectedRedirectUrl in CAS 2.x
Returns the expected redirect URL.
Parameters
int $nid: The node ID.
Return value
string The expected redirect URL.
1 call to CasGatewayAuthSubscriberTest::getExpectedRedirectUrl()
- CasGatewayAuthSubscriberTest::testGatewayPaths in tests/
src/ Functional/ CasGatewayAuthSubscriberTest.php - Test that the gateway auth works as expected.
File
- tests/
src/ Functional/ CasGatewayAuthSubscriberTest.php, line 201
Class
- CasGatewayAuthSubscriberTest
- Tests the CAS gateway login subscriber.
Namespace
Drupal\Tests\cas\FunctionalCode
protected function getExpectedRedirectUrl(int $nid) : string {
return 'https://fakecasserver.localhost/auth/login?' . UrlHelper::buildQuery([
'gateway' => 'true',
'service' => $this
->buildServiceUrlWithParams([
'destination' => "{$GLOBALS['base_path']}node/{$nid}",
'from_gateway' => 1,
]),
]);
}