You are here

public function CasRedirectorTest::getServiceUrl in CAS 8

Same name and namespace in other branches
  1. 2.x tests/src/Unit/Service/CasRedirectorTest.php \Drupal\Tests\cas\Unit\Service\CasRedirectorTest::getServiceUrl()

Get a service URL.

Parameters

string $route: The route name.

array $parameters: The service URL parameters.

Return value

string The constructed service URL.

File

tests/src/Unit/Service/CasRedirectorTest.php, line 115

Class

CasRedirectorTest
Cas Redirector Unit Tests.

Namespace

Drupal\Tests\cas\Unit\Service

Code

public function getServiceUrl($route, array $parameters = NULL) {
  if ($parameters) {
    return 'http://example.com/casservice?' . UrlHelper::buildQuery($parameters);
  }
  else {
    return 'http://example.com/casservice';
  }
}