protected function CasBrowserTestBase::buildServiceUrlWithParams in CAS 8
Same name and namespace in other branches
- 2.x tests/src/Functional/CasBrowserTestBase.php \Drupal\Tests\cas\Functional\CasBrowserTestBase::buildServiceUrlWithParams()
Helper function for constructing an expected service URL.
Any parameters passed into the optional array will be appended to the service URL.
Parameters
array $service_url_params: Parameters to include on the service url.
Return value
string URL in string format.
3 calls to CasBrowserTestBase::buildServiceUrlWithParams()
- CasForcedLoginControllerTest::testForcedLoginRoute in tests/
src/ Functional/ CasForcedLoginControllerTest.php - Tests the the forced login route that redirects users authenticate.
- CasSubscriberTest::testForcedLoginPaths in tests/
src/ Functional/ CasSubscriberTest.php - Test that the CasSubscriber properly forces CAS authentication as expected.
- CasSubscriberTest::testGatewayPaths in tests/
src/ Functional/ CasSubscriberTest.php - Test that the gateway auth works as expected.
File
- tests/
src/ Functional/ CasBrowserTestBase.php, line 49
Class
- CasBrowserTestBase
- Tests the CAS forced login controller.
Namespace
Drupal\Tests\cas\FunctionalCode
protected function buildServiceUrlWithParams(array $service_url_params = []) {
$service_url = $this->baseUrl . '/casservice';
if (!empty($service_url_params)) {
$encoded_params = UrlHelper::buildQuery($service_url_params);
$service_url .= '?' . $encoded_params;
}
return $service_url;
}