/**
  * Delete collection.
  *
  * @param  string $name
  * @param  array  $options
  * @return void
  */
 public function deleteCollection($name, $options = null)
 {
     try {
         $this->_simpleDb->deleteDomain($name);
     } catch (Zend_Service_Amazon_Exception $e) {
         throw new Zend_Cloud_DocumentService_Exception('Error on collection deletion: ' . $e->getMessage(), $e->getCode(), $e);
     }
 }
示例#2
0
	public function testDeleteDomain() {
	    $domainName = $this->_testDomainNamePrefix . '_testDeleteDomain';
        $this->_amazon->deleteDomain($domainName);
        $this->_amazon->createDomain($domainName);
        try {
            $domainListPage = $this->_amazon->listDomains();
            $this->assertContains($domainName, $domainListPage->getData());
            $this->assertNull($domainListPage->getToken());
            // Delete the domain
            $this->_amazon->deleteDomain($domainName);
            $domainListPage = $this->_amazon->listDomains();
            $this->assertNotContains($domainName, $domainListPage->getData());
        } catch(Exception $e) {
            $this->_amazon->deleteDomain($domainName);
            throw $e;
        }
    }