Add test for jsonFormat method that runs regardless of PHP version
Reorganise pagination tests
Add sort functionality and tests