Categories


Loading feed
Loading feed

Designing Klingon Warships Using Behaviour Driven Development

A short time ago, I wrote an article for Devzone entitled “An Introduction to the Art of Unit Testing in PHP” which explained why testing, and especially automated testing, is an important aspect of developing in any programming language. I also offered a brief example of applying a design methodology called Test-Driven Development, which demonstrated that writing tests before code led to improved simpler design free of bugs.

Member Profile: Pádraic Brady

For those who don't know me, I've been developing using PHP since late 2000. I'm an active member of the PHP open source community contributing over the last year to PEAR, the Zend Framework, SimpleTest, PHPSpec and OpenID For PHP. Alongside my open source work, I'm a member of the OpenID Europe Foundation, and OpenID Source Initiative. Most of the time you'll find me arguing PHP theory and practice on the PHP Developer Network forums, or over-writing to my blog.

During the day (and often the night, and weekends), I work as a financial services auditor in my home nation of Ireland. I am currently based in the city of Dublin. Previously I have worked as a freelance PHP/Perl programmer, website designer, foreign exchange clerk and even had a go operating machinery for molding plastics. I am also a freelance writer (mercenary for hire), including here on Zend Devzone.

An Introduction to the Art of Unit Testing in PHP

Testing is an essential aspect of developing in any programming language. If you don’t test your source code then how can you verify it works as expected? Manual testing can only be performed irregularly and usually only in limited ways. The answer to testing source code regularly, and in depth, is to write automated tests which can be frequently executed. In PHP such tests are usually written using a unit testing framework, a framework which allows the source code of any application or library to be tested as isolated units of functionality such as a single class or method. As unit testing has gained popularity, it has become a standard practice in PHP with libraries and frameworks such as Swiftmailer, the Zend Framework and Symfony all requiring unit test coverage of their source code.

Acceptance Testing of Web Applications with PHP

In this article I introduce the topic of Acceptance Testing (aka Functional Testing), something more PHP programmers should be starting to practice. I’m sure many of us are well aware of Unit Testing and even Integration Testing so where does this third wheel come into play for web applications given our growing obsession with Web 2.0 and AJAX and how does it differ from the former two practices? Below I’ll explain this. I will also introduce how to implement Acceptance Testing using the killer combination of PHPUnit and Selenium.