/**
  * @Given I have a configuration to use multiple sub-domains
  */
 public function iHaveAConfigurationToUseMultipleSubDomains()
 {
     $cloud = Cloud::fromName('aCloud');
     $credentials = new Credentials(Key::fromString("aKey"), Secret::fromString("aSecret"));
     $this->configuration = Configuration::fromCloudAndCredentials($cloud, $credentials);
     $this->configuration->enableCdnSubdomain();
 }
 /**
  * @When I ask the provider to validate my credentials
  */
 public function iAskTheProviderToValidateMyCredentials()
 {
     $cloud = Cloud::fromName('session-digital');
     $key = Key::fromString('ABC123');
     $secret = Secret::fromString('DEF456');
     $this->provider->setMockCloud($cloud);
     $this->provider->setMockCredentials($key, $secret);
     $this->areCredentialsValid = $this->provider->validateCredentials();
 }
 function it_should_extract_the_cloud_name_from_the_environment_variable()
 {
     $this->getCloud()->shouldBeLike(Cloud::fromName('aCloud'));
 }
 /**
  * @When I ask the provider to validate my credentials
  */
 public function iAskTheProviderToValidateMyCredentials()
 {
     $this->imageProvider->setMockCloud(Cloud::fromName('session-digital'));
     $this->imageProvider->setMockCredentials(Key::fromString('ABC123'), Secret::fromString('DEF456'));
     $this->areCredentialsValid = $this->imageProvider->validateCredentials();
 }
 public function getCloud()
 {
     return Cloud::fromName(Cloudinary::config_get('cloud_name'));
 }