/**
  * Gets an endpoint using the given server and parameters.
  * @param string $endpoint the base endpoint URL to use
  * @param array $params the parameters to include in the endpoint
  * @return string the endpoint
  */
 private function GetEndpoint($endpoint, $params = null)
 {
     $endpoint = UrlUtils::AddParamsToUrl($endpoint, $params);
     if (!empty($this->server)) {
         $endpoint = UrlUtils::ReplaceServerInUrl($endpoint, $this->server);
     }
     return $endpoint;
 }
 /**
  * Tests ReplaceServerInUrl.
  * @param string $url the URL to perform the replacement on
  * @param string $server the server to replace with
  * @param string $expected the expected value replaced URL
  * @dataProvider ReplaceServiceInUrlProvider
  */
 public function testReplaceServerInUrl($url, $server, $expected)
 {
     $value = UrlUtils::ReplaceServerInUrl($url, $server);
     $this->assertEquals($expected, $value);
 }
 /**
  * Gets an endpoint using the given server and parameters.
  * @param string $endpoint the base endpoint URL to use
  * @param string $server the service to get the endpoint for
  * @param array $params the parameters to include in the endpoint
  * @return string the endpoint
  */
 private function GetEndpoint($endpoint, $server = NULL, $params = NULL)
 {
     $endpoint = UrlUtils::AddParamsToUrl($endpoint, $params);
     if (!empty($server)) {
         $endpoint = UrlUtils::ReplaceServerInUrl($endpoint, $server);
     }
     return $endpoint;
 }