Exemplo n.º 1
0
 public function testSetCloudWithoutId()
 {
     $data = array('name' => 'my_first_cloud', 's3_videos_bucket' => 'my_own_bucket', 'aws_access_key' => 'XQwEwFR', 'aws_secret_key' => 'XoSV2f');
     $this->validateRequest('put', '/clouds/' . $this->httpClient->getCloudId() . '.json', $data);
     $this->validateTransformer('Cloud', 'stringToCloud');
     $this->cloud->setCloud($data);
 }
Exemplo n.º 2
0
 /**
  * {@inheritDoc}
  */
 public function setCloud(array $data, $cloudId = null)
 {
     if (null === $cloudId) {
         $cloudId = $this->httpClient->getCloudId();
     }
     $response = $this->httpClient->put('/clouds/' . $cloudId . '.json', $data);
     $transformer = $this->transformers->getCloudTransformer();
     return $transformer->stringToCloud($response);
 }