/** * Create collection. * * @param string $name * @param array $options * @return void */ public function createCollection($name, $options = null) { try { $this->_simpleDb->createDomain($name); } catch (Zend_Service_Amazon_Exception $e) { throw new Zend_Cloud_DocumentService_Exception('Error on domain creation: ' . $e->getMessage(), $e->getCode(), $e); } }
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; } }