Friday, August 29. 2008Zend Framework testing: emulating HTTP calls
Following last month's article by Ian, here's some thoughts on how to test a Zend Framework application.
One of the unit testing best practices suggests to break dependencies, so you can test each component separately. The first problem that arises when you want to test controllers might be having a tighter control over the HTTP Request and Response objects. Fortunately, ZF already has something that really makes your life easier, i.e. the Zend_Test_PHPUnit_ControllerTestCase class, which has stubs for the Request and Response objects, and you can easily check headers, return codes, routes, redirects, and even the view itself. Continue reading "Zend Framework testing: emulating HTTP calls" Monday, February 11. 2008Using the atkMockDb
If you develop an ATK application but do not have the luxury of a separate test-database, and can only test against actual databases, it is not safe to run testcases that actually add records to the database. Even though testcases can be built to clean-up testdata afterwards, this is not without risk. For instance, when a testcase breaks halfway through the code with a PHP parse error, any testdata that was already added will stay there. Besides the fact that this can break any future executions of your testcase, the testrecord stays in the live database and possibly break the live site.
This is where the atkMockDb kicks in Continue reading "Using the atkMockDb" Thursday, June 14. 2007ATK6 gereleased!![]() Sinds 1 juni ben ik bij Ibuildings aan de slag gegaan als Product Manager. Als afstudeerder heb ik kennis mogen maken met de wereld van PHP, Zend, Content Management Systemen, internationale samenwerking etc. Het was een leuke tijd en met de overgang naar "echte medewerker" kan ik nu datgene in de praktijk brengen wat ik tijdens mijn afstuderen geadviseerd heb! Ik ga me voornamelijk bezighouden met de producten van Ibuildings: applicatieframework ATK, cms WDE, projectmanagementsysteem Achievo en webapplicatie Mockatoo. In mijn tweede week werd er een nieuwe versie van ATK gereleased. Continue reading "ATK6 gereleased!" Wednesday, November 15. 2006ATK gets true test database support
ATK has built-in test support for a while now. But until now this didn't include support for adding, updating and/or removing test data in such a way that the development/production database isn't littered with test data. You can make use of the mock database class, but then you can't really test if the query you wrote actually works the way it's supposed to work. And you can ofcourse remove the test data in your test by writing the necessary code to do so, but this means a lot of extra work.
As of today there's a third option, you can make use of ATK's built-in test database support. Continue reading "ATK gets true test database support"
(Page 1 of 1, totaling 4 entries)
|
Blog

