Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 2.5.0b5

Request #11108 Consider a 'mock' driver for use in unit tests
Submitted: 2007-05-23 13:55 UTC
From: doconnor Assigned:
Status: Open Package: MDB2 (version 2.4.1)
PHP Version: 5.2.1 OS:
Roadmaps: (Not assigned)    
Subscription  


 [2007-05-23 13:55 UTC] doconnor (Daniel O'Connor)
Description: ------------ Provide an mdb2 driver for mock database handling. The best use case for this is in unit test frameworks like phpunit, or similar. See http://pear.php.net/bugs/bug.php?id=11107 for the original RFE, aimed at PEAR::DB

Comments

 [2007-05-23 17:42 UTC] quipo (Lorenzo Alberton)
While I like the idea, I don't have the time to write a MDB_Driver_mock class. If you or someone else is willing to write such a package, we can publish it just like the other "real" drivers (I'd be glad to!). FYI: it's not really the same thing, but there is a MDB2_Driver_querysim package already, even if it's not currently maintained and maybe not up-to-date with the other drivers. Maybe you can pick it up?
 [2008-12-30 12:19 UTC] troehr (Torsten Roehr)
 [2009-01-25 12:25 UTC] quipo (Lorenzo Alberton)
 [2013-04-09 02:18 UTC] kguest (Ken Guest)
I've made an attempt at this, code is at https://github.com/kenguest/MDB2_Driver_Mock It works ok for general unit testing - I've not tried it at anything too fancy and haven't had time to submit it through PePR yet.