/**
  * @covers WindowsAzure\Common\Internal\ServiceManagementSettings::createFromConnectionString
  * @covers WindowsAzure\Common\Internal\ServiceManagementSettings::init
  * @covers WindowsAzure\Common\Internal\ServiceManagementSettings::__construct
  * @covers WindowsAzure\Common\Internal\ServiceSettings::getValidator
  * @covers WindowsAzure\Common\Internal\ServiceSettings::optional
  * @covers WindowsAzure\Common\Internal\ServiceSettings::allRequired
  * @covers WindowsAzure\Common\Internal\ServiceSettings::setting
  * @covers WindowsAzure\Common\Internal\ServiceSettings::settingWithFunc
  * @covers WindowsAzure\Common\Internal\ServiceSettings::matchedSpecification
  * @covers WindowsAzure\Common\Internal\ServiceSettings::parseAndValidateKeys
  * @covers WindowsAzure\Common\Internal\ServiceSettings::noMatch
  */
 public function testCreateFromConnectionStringWithCaseInsensitive()
 {
     // Setup
     $expectedSubscriptionId = 'mySubscriptionId';
     $expectedCertificatePath = 'C:\\path_to_my_cert.pem';
     $expectedEndpointUri = 'http://myprivatedns.com';
     $connectionString = "suBscriptIonId={$expectedSubscriptionId};ceRtiFicAtepAth={$expectedCertificatePath};ServiCemAnagemenTendPoinT={$expectedEndpointUri}";
     // Test
     $actual = ServiceManagementSettings::createFromConnectionString($connectionString);
     // Assert
     $this->assertEquals($expectedEndpointUri, $actual->getEndpointUri());
     $this->assertEquals($expectedCertificatePath, $actual->getCertificatePath());
     $this->assertEquals($expectedEndpointUri, $actual->getEndpointUri());
 }
 /**
  * Builds a service management object.
  *
  * @param string $connectionString The configuration connection string.
  *
  * @return WindowsAzure\ServiceManagement\Internal\IServiceManagement
  */
 public function createServiceManagementService($connectionString)
 {
     $settings = ServiceManagementSettings::createFromConnectionString($connectionString);
     $certificatePath = $settings->getCertificatePath();
     $httpClient = new HttpClient($certificatePath);
     $serializer = $this->serializer();
     $uri = Utilities::tryAddUrlScheme($settings->getEndpointUri(), Resources::HTTPS_SCHEME);
     $serviceManagementWrapper = new ServiceManagementRestProxy($httpClient, $settings->getSubscriptionId(), $uri, $serializer);
     // Adding headers filter
     $headers = array(Resources::USER_AGENT => Resources::SDK_USER_AGENT);
     $headers[Resources::X_MS_VERSION] = Resources::SM_API_LATEST_VERSION;
     $headersFilter = new HeadersFilter($headers);
     $serviceManagementWrapper = $serviceManagementWrapper->withFilter($headersFilter);
     return $serviceManagementWrapper;
 }