CakePHP
Testing a Subset of Methods Within a Test Case
UPDATE: @savant and I were chatting in #cakephp one night. Turns out he had something similar, and took some of my ideas and came up with a nice solution: https://gist.github.com/1208800
We all know that testing can be really slow if you have a large app with a lot of fixtures. When dealing with this on a large test case file, it becomes a huge time waste to test the entire file each time when...
Cache Query Results Transparently
We all know that caching will (usually) speeds up your application. There are several methods for caching information in CakePHP, including caching your views, elements, arbitrary information and queries. I'm not going to go over these methods in this post, but rather introduce a plugin that caches the actual results of your queries.
Caching your find call results can dramatically improve per...
Debugging CakePHP Ajax calls with FirePHP
If you're writing a CakePHP application, one of the first things you should be doing when starting out is downloading DebugKit, the invaluable debugging plugin. If you don't have it, go install it here: https://github.com/cakephp/debug_kit
Most web apps make use of Ajax here and there. And with Cake and jQuery basically doing the work for you, why wouldn't you? Debugging these requests can be ...
Quick Tip: Better requestAction content
A big gripe I have with ajax is that when you initially land on the page, you have to wait for ajax to fetch content to fill containers (a la WordPress dashboard). This is annoying and ugly, and you typically have content bouncing around after it's populated. So, I thought, use requestAction() for the initial load (no bouncing), then your ajax pagination within those views will appear seamless....
Testing Controllers in CakePHP 2.0
In the past, testing controllers in CakePHP always had its hiccups. In 2.0, testAction was written from the ground up to allow for mocking and an all-inclusive set of results.
To gain this new functionality, you'll need to do is extend your test case by ControllerTestCase instead of the typical CakeTestCase. ControllerTestCase gives you access to two new methods, testAction and generate and se...

