Neaten Up
Make Function Public To Ease Testing
Clean Request In Static Context
Stub Out Some Tests
Merge branch 'develop' into feature/api-http-codes-tests
Merge branch 'develop' into feature/api-http-codes-tests
initial commit of api tests.. still yet to complete
Merge branch 'develop' into feature/api-http-codes-tests
finished off a test made sure the dependency on modules don't break everything
Merge branch 'develop' into feature/api-http-codes-tests

Conflicts:
	application/controllers/api.php
Added more API tests. Its however broken due to issues with sqlite database not liking some queries (i think)
Fixes for api test cases
Fix to api.test.php to get tests working with sqlite

sqlite seems to treat empty values differently from MySQL. So values that need to be empty should be entered as '' explicitly for sqlite to not fail
Fixed api.test.php so it won't break in Travis

* removed extra call to tearDown() because this was unnecessary and was causing the Travis error
* not now removing all directories and files from the api storage folder. The dummy modules json files are now kept.
* added some comments
* converted tabs to spaces
Corrected case for json cache files
Merge branch 'feature/api-http-codes-tests' of github.com:unikent/programmes-plant into fixes/sure-up-api
Also fix test errors.

Conflicts:
	application/controllers/api.php
	application/controllers/programmes.php
	application/models/programme.php
	application/models/revisionable.php
Add keywords to search + correct filter
zero length arrays when replacing id data.
Merge pull request #204 from unikent/fixes/sure-up-api

Fix API, integrate tests and shore everything up.