Unit Testing Zend Framework Applications
CodeUtopia has some thoughts on Unit Testing Zend Framework applications.
There are some good points made, particularly on the difficulty of realistically testing Controller classes:
Controller testing can be the most difficult part, and this is where you may need to perform some refactoring if your design is not suitable for testing. For example, you may have a lot of logic in your controllers, which might be better off in your models or library code. Testing the whole idea of getting out the correct output or redirects may be difficult.
Zend probably should have had a Unit Testing strategy when developing the Framework initially, but, as always, the community fills in the holes. This also highlights another problem developing PHP applications: there is no standard build process, in which scripts can be unit tested, compiled, optimized, packaged, etc. There are solutions available (Phing is popular, it’s even possible to use Ant) but this is an area where Zend could show real leadership and come up with their own industry-standard, solution (maybe even as part of the Zend Framework, or Zend Studio). I’m not holding my breath, but you never know.
James E. Hansen: almost too late to stop the “global warming time bomb”
Dr. James E. Hansen is a World-renowned climatologist at NASA, widely praised for being one of the first scientists to recognise the effect of man-made carbon-dioxide production on the environment in a congressional testimony in the 1980’s.
Today, Dr. Hansen is back before congress, renewing his 20-year-old call to action:
On Monday, Dr. Hansen, 67, plans to give a briefing organized by a House committee and say that it is almost, but not quite, too late to start defusing what he calls the “global warming time bomb.” He will offer a plan for cuts in emissions and also a warning about the risks of further inaction.
Although he is vilified by some on the right for his stance on global warming, Dr. Hansen is one of the most credible climatologists in the World, and deserves to be heard. He is currently the director of NASA’s Goddard Institute for Space Studies and Al Gore’s chief science advisor.
Allow sites to hide the navigation bar in Firefox 3
By default, Firefox 3 now blocks Javascript code from hiding the browser navigation bar. The idea behind this is simply to stop malicious popups from emulating a native OS window.
But, for advances users well aware of what constitutes a malicious popup and what it looks like, the ever-present navigation bar can be distracting. Fortunately, you can disabled it by altering a setting in about:config.
- Type about:config into the navigation bar and press Enter (ignore the warning).
- Type dom.disable_window_open_feature.location into the filter textbox. A single entry should remain.
- Change the value field to false.
You can now close the about:config window; popups can now hide the navigation bar like in previous versions of Firefox. To restore the default setting, simply change the value back to true.