OOPing the database interface

While trying to write few test cases that involve database interactions I realized that in the current form it is quite hard to test the generated queries. So I went on to OOP the database interface. With OOPed code we can mock database interface, just like I've done for  Node_Test::testGetData(), Node_Test::testGetPresenceWithEnabledIS() and Node_Test::testGetPresenceWithDisabledIS()