/** * Sets up this test case * * @return void */ public function setUp() { $this->_amazon = new Zend_Service_Amazon(constant('TESTS_ZEND_SERVICE_AMAZON_ONLINE_ACCESSKEYID')); $this->_query = new Zend_Service_Amazon_Query(constant('TESTS_ZEND_SERVICE_AMAZON_ONLINE_ACCESSKEYID')); $this->_httpClientAdapterSocket = new Zend_Http_Client_Adapter_Socket(); $this->_amazon->getRestClient()->getHttpClient()->setAdapter($this->_httpClientAdapterSocket); // terms of use compliance: no more than one query per second sleep(1); }
/** * Sets up this test case * * @return void */ public function setUp() { if (!defined('TESTS_ZEND_SERVICE_AMAZON_ONLINE_ACCESSKEYID') || !defined('TESTS_ZEND_SERVICE_AMAZON_ONLINE_SECRETKEY')) { $this->markTestSkipped('Constants AccessKeyId and SecretKey have to be set.'); } $this->_amazon = new Zend_Service_Amazon(TESTS_ZEND_SERVICE_AMAZON_ONLINE_ACCESSKEYID, 'US', TESTS_ZEND_SERVICE_AMAZON_ONLINE_SECRETKEY); $this->_query = new Zend_Service_Amazon_Query(TESTS_ZEND_SERVICE_AMAZON_ONLINE_ACCESSKEYID, 'US', TESTS_ZEND_SERVICE_AMAZON_ONLINE_SECRETKEY); $this->_httpClientAdapterSocket = new Zend_Http_Client_Adapter_Socket(); $this->_amazon->getRestClient()->getHttpClient()->setAdapter($this->_httpClientAdapterSocket); // terms of use compliance: no more than one query per second sleep(1); }
/** * Sets up this test case * * @return void */ public function setUp() { if (!constant('TESTS_ZEND_SERVICE_AMAZON_ONLINE_ENABLED')) { $this->markTestSkipped('Zend_Service_Amazon_S3 online tests are not enabled'); } if (!defined('TESTS_ZEND_SERVICE_AMAZON_ONLINE_ACCESSKEYID') || !defined('TESTS_ZEND_SERVICE_AMAZON_ONLINE_SECRETKEY')) { $this->markTestSkipped('Constants AccessKeyId and SecretKey have to be set.'); } $this->_amazon = new Amazon\Amazon(TESTS_ZEND_SERVICE_AMAZON_ONLINE_ACCESSKEYID, 'US', TESTS_ZEND_SERVICE_AMAZON_ONLINE_SECRETKEY); $this->_query = new Amazon\Query(TESTS_ZEND_SERVICE_AMAZON_ONLINE_ACCESSKEYID, 'US', TESTS_ZEND_SERVICE_AMAZON_ONLINE_SECRETKEY); $this->_httpClientAdapterSocket = new \Zend\HTTP\Client\Adapter\Socket(); $this->_amazon->getRestClient()->getHttpClient()->setAdapter($this->_httpClientAdapterSocket); // terms of use compliance: no more than one query per second sleep(1); }