public function testEnableCdnContainer()
 {
     $data = $this->rackspace->enableCdnContainer('zf-unit-test');
     $this->assertTrue($data !== false);
     $this->assertTrue(is_array($data));
     $this->assertTrue(!empty($data['cdn_uri']));
     $this->assertTrue(!empty($data['cdn_uri_ssl']));
 }
Beispiel #2
0
 public function testEnableCdnContainer()
 {
     $data = $this->rackspace->enableCdnContainer(TESTS_ZEND_SERVICE_RACKSPACE_CONTAINER_NAME);
     $this->assertTrue($data !== false);
     $this->assertTrue(is_array($data));
     $this->assertTrue(!empty($data['cdn_uri']));
     $this->assertTrue(!empty($data['cdn_uri_ssl']));
 }
Beispiel #3
0
 /**
  * Create a new container if it doesn't exists.
  *
  * @return string
  */
 public function getCurrentClientContainer()
 {
     if (empty($this->_clientId)) {
         return false;
     }
     $container = strtolower(APPLICATION_ENV) . '-client-' . $this->_clientId;
     if (!$this->_service->getContainer($container)) {
         $this->_service->createContainer($container);
         $this->_service->enableCdnContainer($container);
         if (!$this->_service->isSuccessful()) {
             throw new Exception($this->_service->getErrorMsg());
         }
     }
     return $container;
 }