I have tried following the last example on
http://framework.zend.com/manual/en/zend.test.phpunit.db.html#zend.test.phpunit.db.quickstart.testcase
:
$adapter = new Zend_Test_DbAdapter();
$stmt = $adapter->query("SELECT * FROM bugs");
$qp = $adapter->getProfiler()->getLastQueryProfile();
Basically, I have a test adapter used in my unit tests and want to see what
queries have been called on the test db adapter.
When I try the code on the above example the getLastQueryProfile() method
always returns false when i try and run the query( ) method. I have noticed
that calling beginTransaction() seems to work though.
I noticed a bug logged on the Zend site where the profiler was not being set
for the Zend_Test_DbAdapter, but have updated to the latest version of Zend
studio and still can't get this to work.
Any ideas on this?
Thanks,
Geoff
--
View this message in context: http://www.nabble.com/Using-Zend-Test-DB-Adapter-with-profiler-tp25871754p25871754.html
Sent from the Zend DB mailing list archive at Nabble.com.
没有评论:
发表评论