This post describes a simple, lightweight strategy for implementing Continuous Integration on PHP-based software projects. This approach happens to use Subversion for version control, PHPUnit for unit testing, and Phing to automate the processes involved, but hopefully the principles are generally applicable.
The post won't strive to be exhaustive or encyclopaedic, rather it will present a simple proof-of-concept and a brief overview of the tools that are available to PHP developers. But first some background...
Read more »One of the trickiest aspects of unit testing or Test Driving an application's code is testing those parts of the system which depend on an external system, such as a database or a SOAP service.
In this post I'll outline an approach to testing a class which happens to communicate with a third-party SOAP service using PHP's built-in SoapClient class. Hopefully, the principles involved will be applicable to the more general case of testing code which relies on an external system.
I've been doing a bit of presenting at work recently, which has meant getting my head around making up slides (using OpenOffice, of course). It all feels a little bit Dilbert, in a way.
Anyway, there's nothing particularly groundbreaking or PlayPhone-specific about these slides, so I've put them up on Slideshare in case anyone fancies a look.
Read more »A few years ago, as an exercise in Test-Driven Development, I wrote a Turing machine simulator in PHP and imaginatively named it PHPTuring.
I had completely forgotten about it until today, when I dug it out for another look. Truth be told, I still haven't seen a Turing machine done any better in PHP, and apart from a few syntactical niceties (removing closing PHP tags as per the Zend way, neatening up the PHPDoc blocks) I'm actually pretty comfortable with the code.
Read more »Just a quick post to mention that, yes, my commitment to TDD show no signs of abating, especially in the face of the various unfamiliar technologies with which I've been working recently.
Today I came across JsUnit. Which may be old news to many, but I don't stray into JavaScript territory very often, and when I do, I'm usually quite frightened!
Read more »