Beispiel #1
0
 /**
  * Sets up this test case
  *
  * @return void
  */
 public function setUp()
 {
     if (!constant('TESTS_ZEND_SERVICE_FLICKR_ONLINE_ENABLED')) {
         $this->markTestSkipped('Zend_Service_Flickr online tests are not enabled');
     }
     $this->flickr = new Flickr(constant('TESTS_ZEND_SERVICE_FLICKR_ONLINE_APIKEY'));
     $this->httpClientAdapterSocket = new SocketAdapter();
     $this->flickr->getRestClient()->getHttpClient()->setAdapter($this->httpClientAdapterSocket);
 }
Beispiel #2
0
 /**
  * Utility method that saves an HTTP response to a file
  *
  * @param  string $name
  * @return void
  */
 protected function saveResponse($name)
 {
     file_put_contents("{$this->filesPath}/{$name}.response", $this->flickr->getRestClient()->getHttpClient()->getLastResponse()->asString());
 }