Tests will be added as they are thought up but these are the initial tests I have in mind:
A query is run for the first time against a sample database, test to make sure the source (specified by metadata) is database. This query will be cached for 5 seconds
Identical query is run, test to make sure result source is cache.
Sleep for 5 seconds, repeat query, test to make sure source is database.
Test that proper exceptions are thrown when invalid values are set into various config settings
Intentionally corrupt cache and ensure library handles this event gracefully
Going to implement phpunit.
Tests will be added as they are thought up but these are the initial tests I have in mind: