/** * Sets up this test case * * @return void */ public function setUp() { $this->_amazon = new Zend_Service_Amazon_SimpleDb(constant('TESTS_ZEND_SERVICE_AMAZON_ONLINE_ACCESSKEY'), constant('TESTS_ZEND_SERVICE_AMAZON_ONLINE_SECRETKEY')); $this->_httpClientAdapterSocket = new Zend_Http_Client_Adapter_Socket(); $this->_amazon->getHttpClient()->setAdapter($this->_httpClientAdapterSocket); $this->_testDomainNamePrefix = 'TestsZendServiceAmazonSimpleDbDomain'; $this->_testItemNamePrefix = 'TestsZendServiceAmazonSimpleDbItem'; $this->_testAttributeNamePrefix = 'TestsZendServiceAmazonSimpleDbAttribute'; $this->_wait(); }
/** * Constructor * * @param array|Zend_Config $options * @return void */ public function __construct($options = array()) { if ($options instanceof Zend_Config) { $options = $options->toArray(); } if (!is_array($options)) { throw new Zend_Cloud_DocumentService_Exception('Invalid options provided to constructor'); } $this->_simpleDb = new Zend_Service_Amazon_SimpleDb($options[self::AWS_ACCESS_KEY], $options[self::AWS_SECRET_KEY]); if (isset($options[self::HTTP_ADAPTER])) { $this->_simpleDb->getHttpClient()->setAdapter($options[self::HTTP_ADAPTER]); } if (isset($options[self::DOCUMENT_CLASS])) { $this->setDocumentClass($options[self::DOCUMENT_CLASS]); } if (isset($options[self::DOCUMENTSET_CLASS])) { $this->setDocumentSetClass($options[self::DOCUMENTSET_CLASS]); } if (isset($options[self::QUERY_CLASS])) { $this->setQueryClass($options[self::QUERY_CLASS]); } }