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

Request #11107 Include a 'mock' database driver for unit testing
Submitted: 2007-05-23 13:51 UTC
From: doconnor Assigned:
Status: Wont fix Package: DB (version 1.7.11)
PHP Version: 5.2.1 OS:
Roadmaps: (Not assigned)    
Subscription  


 [2007-05-23 13:51 UTC] doconnor (Daniel O'Connor)
Description: ------------ pearweb contains the initial scratchings of a mock database driver, for use in unit tests. It would be wonderful to include such a driver in pear db - even if it wasn't part of the main package (DB_mock?) See http://cvs.php.net/viewvc.cgi/pearweb/tests/mockDB/ for the current implementation. This would benefit many people out there with older applications that still rely on pear::db, instead of mdb2 - better unit test coverage lessens the barriers to upgrading to mdb2; for instance.

Comments

 [2007-05-23 15:18 UTC] aharvey (Adam Harvey)
Given the deprecated nature of DB and the fact that it is only maintained for security and bug fixes, I'm going to mark this won't fix. At any rate, I would suspect that anyone likely to write unit tests for code that uses DB already has. My advice would be to look at turning this into either a package dependent on MDB2 or an MDB2 subpackage, depending on the preferences of Lukas, Lorenzo and co -- however while the concept is sound, I can't in good conscience support any significant new code based on DB instead of MDB2.