/** * Sets up this test case * * @return void */ public function setUp() { $this->_amazon = new SimpleDb\SimpleDb(constant('TESTS_ZEND_SERVICE_AMAZON_ONLINE_ACCESSKEYID'), constant('TESTS_ZEND_SERVICE_AMAZON_ONLINE_SECRETKEY')); $this->_httpClientAdapterSocket = new Socket(); $this->_amazon->getHttpClient()->setAdapter($this->_httpClientAdapterSocket); $this->_testDomainNamePrefix = 'TestsZendServiceAmazonSimpleDbDomain'; $this->_testItemNamePrefix = 'TestsZendServiceAmazonSimpleDbItem'; $this->_testAttributeNamePrefix = 'TestsZendServiceAmazonSimpleDbAttribute'; $this->_wait(); }
/** * Sets up this test case * * @return void */ public function setUp() { if (!constant('TESTS_ZEND_SERVICE_AMAZON_ONLINE_ENABLED')) { $this->markTestSkipped('Zend_Service_Amazon online tests are not enabled'); } $this->_amazon = new SimpleDb\SimpleDb(constant('TESTS_ZEND_SERVICE_AMAZON_ONLINE_ACCESSKEYID'), constant('TESTS_ZEND_SERVICE_AMAZON_ONLINE_SECRETKEY')); $this->_httpClientAdapterSocket = new 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 Exception\InvalidArgumentException('Invalid options provided to constructor'); } $this->_simpleDb = new SimpleDbService($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]); } }