\FlickrServiceTest
Synopsis
class FlickrServiceTest
extends SapphireTest
{
- // members
- private integer $callCount = 0;
- // methods
- public void setUpOnce()
- public void testGetSetApiKey()
- public void testGetPhotosetsForUser()
- public void testGetPhotosInPhotoset()
- public void testGetCachedCall()
- public __phockito_FlickrService_Spy getMockService()
- private [type] getMockResponse_getPhotosetsForUser()
- private void getMockResponse_getPhotosInPhotoset()
- private void getMockResponse_getPhotosetsForUser_increaseCount()
Hierarchy
Extends
- SapphireTest
Members
private
- $callCount
Methods
private
- getMockResponse_getPhotosInPhotoset()
- getMockResponse_getPhotosetsForUser() — Mimic successful responses from the Flickr API
- getMockResponse_getPhotosetsForUser_increaseCount()
public
- getMockService() — Setup a mock service using Phockito::spy() to mock a basic version of `isAPIAvaiable`
- setUpOnce()
- testGetCachedCall() — Basic test to check that using the `getCachedCall` only makes an API request if the soft cache expiry has elasped
- testGetPhotosInPhotoset() — Basic test to check a successful mocked API response returns an ArrayList with expected amount of items
- testGetPhotosetsForUser() — Basic test to check a successful mocked API response returns an ArrayList with expected amount of items
- testGetSetApiKey() — Test that the set/get API key methods work