예제 #1
0
 function setUp()
 {
     $this->api = new Phlickr_Api(TESTING_API_KEY, TESTING_API_SECRET, TESTING_API_TOKEN);
     $this->api->setEndpointUrl('http://example.com');
     $this->request = new Phlickr_Tests_Mocks_Request($this->api, 'USER SPECIFIED SEARCH', TESTING_RESP_OK_PREFIX . TESTING_XML_PHOTOSET_PHOTOS . TESTING_RESP_SUFIX);
     // ... then for the photos
     $this->api->addResponseToCache(Phlickr_PhotosetPhotoList::getRequestMethodName(), Phlickr_PhotosetPhotoList::getRequestMethodParams(TESTING_XML_PHOTOSET_ID), TESTING_RESP_OK_PREFIX . TESTING_XML_PHOTOSET_PHOTOS . TESTING_RESP_SUFIX);
     $this->request = $this->api->createRequest('flickr.photosets.getPhotos', array('photoset_id' => TESTING_XML_PHOTOSET_ID));
     $this->psl = new Phlickr_PhotosetPhotoList($this->request);
 }
예제 #2
0
 function setUp()
 {
     $this->api = new Phlickr_Api(TESTING_API_KEY, TESTING_API_SECRET);
     $this->stratId = new Phlickr_PhotoSortStrategy_ById();
     $this->stratTitle = new Phlickr_PhotoSortStrategy_ByTitle();
     // create a request
     $this->request = $this->api->createRequest(Phlickr_PhotosetPhotoList::getRequestMethodName(), Phlickr_PhotosetPhotoList::getRequestMethodParams(PHOTOSET_ID));
     // then make sure that there's data in the cache to fufill it
     $this->api->addResponseToCache(Phlickr_PhotosetPhotoList::getRequestMethodName(), Phlickr_PhotosetPhotoList::getRequestMethodParams(PHOTOSET_ID), TESTING_RESP_OK_PREFIX . PHOTOSET_PHOTOS . TESTING_RESP_SUFIX);
     // an IPhotoList
     $this->psl = new Phlickr_PhotosetPhotoList($this->request);
 }