Things tagged with Practices and Habits

Testing CakePHP Controllers the hard way

By now you already know or should know about CakeTestCase::testAction() and the wondrous things it can do. However, testAction has a few shortcomings. It can’t handle redirects, it doesn’t let you use the power of Mocks, and its impossible to make assertions on object state changes. Sometimes you need to do things the hard way, stick your fingers in the mud and work it out.

Github hooked up

As I post more and more code here, I’m finding it tedious to update all the various .zip files of code as I make changes. So I’ve taken a page from Tim and Felix and made an account at gitHub. This makes it easy for me and you to find the newest revision of whatever you may be looking for.