Ejemplo n.º 1
0
 /**
  * Tears down this test case
  *
  * @return void
  */
 public function tearDown()
 {
     if (!$this->_config) {
         return;
     }
     // Delete the container here
     $rackspace = new Zend_Service_Rackspace_Files($this->_config->get(Zend_Cloud_StorageService_Adapter_Rackspace::USER), $this->_config->get(Zend_Cloud_StorageService_Adapter_Rackspace::API_KEY));
     $files = $rackspace->getObjects($this->_config->get(Zend_Cloud_StorageService_Adapter_Rackspace::REMOTE_CONTAINER));
     if ($files == !false) {
         foreach ($files as $file) {
             $rackspace->deleteObject($this->_config->get(Zend_Cloud_StorageService_Adapter_Rackspace::REMOTE_CONTAINER), $file->getName());
         }
     }
     $rackspace->deleteContainer($this->_config->get(Zend_Cloud_StorageService_Adapter_Rackspace::REMOTE_CONTAINER));
     parent::tearDown();
 }
Ejemplo n.º 2
0
 public function testDeleteContainer()
 {
     $this->assertTrue($this->rackspace->deleteContainer(TESTS_ZEND_SERVICE_RACKSPACE_CONTAINER_NAME));
 }
Ejemplo n.º 3
0
 public function testDeleteContainer()
 {
     $this->assertTrue($this->rackspace->deleteContainer('zf-unit-test'));
 }