Esempio n. 1
0
 /**
  * List collections.
  *
  * @param  array  $options
  * @return array
  */
 public function listCollections($options = null)
 {
     try {
         // TODO package this in Pages
         $domains = $this->_simpleDb->listDomains()->getData();
     } catch (Zend\Service\Amazon\Exception $e) {
         throw new Exception\RuntimeException('Error on collection deletion: ' . $e->getMessage(), $e->getCode(), $e);
     }
     return $domains;
 }
Esempio n. 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;
     }
 }