PHPSpec BDD framework for PHP
January 16, 2008
PHPSpec is the first BDD framework for PHP, similar to RSpec in ruby. There are clear advantages of BDD over TDD suck as test against specification of behavior.
“PHPSpec is a simple framework. As the official description suggests you can write code examples which are repeatable. This means you write an example, and may repeat it as often as you wish to ensure the implementation code it relates to continues to abide by the example. PHPSpec is related to Unit Testing, but our Behaviour-Driven Development (BDD) origins determine we use a clear plain English style API. This API, given it’s fluent style and approximation of natural language is therefore referred to as a Domain Specific Language (DSL). At a deeper level, PHPSpec was designed entirely with BDD in mind. Though similar to Unit Testing, the framework is being designed to support BDD from the ground so that learning, understanding and practicing BDD is as easy as possible.”