/** * 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(); }
/** * Tears down this test case * * @return void */ public function tearDown() { $path = $this->_config->local_directory; // If the test directory exists, remove it if (file_exists($path)) { $this->_rmRecursive($path); } parent::tearDown(); }
/** * Tears down this test case * * @return void */ public function tearDown() { if (!$this->_config) { return; } // Delete the bucket here $s3 = new Zend_Service_Amazon_S3($this->_config->get(Zend_Cloud_StorageService_Adapter_S3::AWS_ACCESS_KEY), $this->_config->get(Zend_Cloud_StorageService_Adapter_S3::AWS_SECRET_KEY)); $s3->removeBucket($this->_config->get(Zend_Cloud_StorageService_Adapter_S3::BUCKET_NAME)); parent::tearDown(); }