Archive for the ‘PHP scripts’ Category
PHP Static Methods Can Be Declared Without Static Keyword But Called Statically
Friday, September 3rd, 2010Whenever I create a PHP class method that I intend to use statically, I declare it as …
Zend Config XML and INI files - How to Specify False and Other Non-String PHP Data Types
Friday, August 27th, 2010Zend Config INI and Zend Config XML are handy adaptors that allow you …
Simple PHP pretty date time now!
Saturday, July 3rd, 2010Sometimes I just wanna print a date and time in PHP quickly. I’m forever going off to …
Setting the referrer in SimpleTest web tests - faking the HTTP_REFERER
Thursday, April 8th, 2010Sometimes you might want to make a PHP web page do different things depending on the value …
How to Unit-Test for Expected Exception Thrown in Simpletest - *The* Answer
Saturday, January 16th, 2010I keep forgetting how to assert that an Exception is going to be thrown in Simpletest version …
Creating a PHP Subclassed Singleton to Apply Fowler’s “Introduce Null Object” Refactoring
Saturday, January 16th, 2010I found a need to implement the “Introduce Null Object“ refactoring procedure that is …
How to Access Custom Config Settings Within Bootstrap - Zend Framework Application
Tuesday, September 15th, 2009Ok - so you have a Zend Framework ini file that contains the line:
mycustom.setting ="bar"
…and you want …
Simpletest expectation class that ignores whitespace in Mock Zend Db Queries
Sunday, January 18th, 2009I was trying out Simpletest (unit testing framework) using a mock Zend Db connection that expected …

