private function __construct(Cloud $cloud, Credentials $credentials)
 {
     $this->cdnSubdomain = false;
     $this->credentials = $credentials;
     $this->cloud = $cloud;
     $this->defaultTransformation = Transformation::builder();
 }
 /**
  * @Then the image provider should use multiple sub-domains
  */
 public function theImageProviderShouldUseMultipleSubDomains()
 {
     $request1 = $this->imageProvider->transformImage(Image::fromPath('somePath'), Transformation::builder());
     $request2 = $this->imageProvider->transformImage(Image::fromPath('someOtherPath'), Transformation::builder());
     expect($this->requestPrefixIsTheSame($request1, $request2))->toBe(false);
 }
 /**
  * @Then the image :anImage should no longer be available in the image provider
  */
 public function theImageShouldNoLongerBeAvailableInTheImageProvider($anImage)
 {
     expect($this->imageProvider->transformImage($anImage, Transformation::builder()))->toBe('');
 }
 public function transformImage(Image $image, Transformation $transformation)
 {
     return http_build_query($transformation->build()) . '/' . $this->images[(string) $image];
 }