Ejemplo n.º 1
0
 function setUp()
 {
     $this->api = new Phlickr_Api(TESTING_API_KEY, TESTING_API_SECRET, TESTING_API_TOKEN);
     $this->api->setEndpointUrl('http://example.com');
     // inject the response xml into the cache...
     // ... first for the full description of the photoset
     $this->api->addResponseToCache(Phlickr_Photoset::getRequestMethodName(), Phlickr_Photoset::getRequestMethodParams(TESTING_XML_PHOTOSET_ID), TESTING_RESP_OK_PREFIX . TESTING_XML_PHOTOSET . TESTING_RESP_SUFIX);
     $this->psInteger = new Phlickr_Photoset($this->api, TESTING_XML_PHOTOSET_ID);
     $this->psXml = new Phlickr_Photoset($this->api, simplexml_load_string(TESTING_XML_PHOTOSET));
 }
Ejemplo n.º 2
0
 function setUp()
 {
     $this->api = new Phlickr_Api(TESTING_API_KEY, TESTING_API_SECRET, TESTING_API_TOKEN);
     $this->api->setEndpointUrl('http://example.com');
     // inject the response xml into the cache...
     // ... first the login details (so it can figure out the user id)
     $this->api->addResponseToCache('flickr.auth.checkToken', $this->api->getParamsForRequest(), TESTING_RESP_OK_PREFIX . TESTING_XML_CHECKTOKEN . TESTING_RESP_SUFIX);
     // ... then the full description of the photoset
     $this->api->addResponseToCache(Phlickr_Photoset::getRequestMethodName(), Phlickr_Photoset::getRequestMethodParams(TESTING_XML_PHOTOSET_ID), TESTING_RESP_OK_PREFIX . TESTING_XML_PHOTOSET . TESTING_RESP_SUFIX);
     $this->psInteger = new Phlickr_AuthedPhotoset($this->api, TESTING_XML_PHOTOSET_ID);
     $this->psXml = new Phlickr_AuthedPhotoset($this->api, simplexml_load_string(TESTING_XML_PHOTOSET));
 }