예제 #1
0
 /**
  * Tears down this test case
  *
  * @return void
  */
 public function tearDown()
 {
     if (!$this->_config) {
         return;
     }
     // Delete the container here
     $rackspace = new RackspaceService($this->_config->get(\ZendCloud\StorageService\Adapter\Rackspace::USER), $this->_config->get(\ZendCloud\StorageService\Adapter\Rackspace::API_KEY));
     $files = $rackspace->getObjects($this->_config->get(\ZendCloud\StorageService\Adapter\Rackspace::REMOTE_CONTAINER));
     if ($files == !false) {
         foreach ($files as $file) {
             $rackspace->deleteObject($this->_config->get(\ZendCloud\StorageService\Adapter\Rackspace::REMOTE_CONTAINER), $file->getName());
         }
     }
     $rackspace->deleteContainer($this->_config->get(\ZendCloud\StorageService\Adapter\Rackspace::REMOTE_CONTAINER));
     parent::tearDown();
 }