1 Jan 2009 14:16
Asking for feedback on MDB2_Driver_mock draft
Torsten Roehr <roehr <at> zilleon.com>
2009-01-01 13:16:08 GMT
2009-01-01 13:16:08 GMT
Hi devs, I would like to get feedback on a first draft for an MDB2 mock driver. It's neither complete nor perfect yet but please take a look and express your opinion: Zip: http://pear.zilleon.com/MDB2_Driver_mock/MDB2_Driver_mock.zip Source code: http://pear.zilleon.com/MDB2_Driver_mock/mock.php.txt http://pear.zilleon.com/MDB2_Driver_mock/Datatype/mock.php.txt http://pear.zilleon.com/MDB2_Driver_mock/tests/MDB2_Driver_mockTest.php.txt It's heavily been borrowed from Greg Beaver's mockDB code used for testing pearweb (with his permission): http://cvs.php.net/viewvc.cgi/pearweb/tests/mockDB/ For a better understanding of how it works please take a look at the example and the unit tests: http://pear.zilleon.com/MDB2_Driver_mock/example.php.txt http://pear.zilleon.com/MDB2_Driver_mock/tests/MDB2_Driver_mockTest.php.txt There are methods to simulate fails as well to test that the application reacts to errors as expected: For class MDB2_Driver_mock: setConnectFails(true) setPrepareFails(true) setCharsetFails(true)(Continue reading)
Hash is enabled by default with 5.1.2 onwards and is available in pecl
for lower PHP versions (including PHP 4).
So my question is, do people want to make a push on the packages that
make use of mhash and make them use hash instead ?
To me it would seem like a good thing to do.
Regards
Helgi
RSS Feed