The Workshop:
Specification BDD with Phpspec

By Joe Ferguson

phpspec is a package which allows us to use Behavior-Driven Development, BDD, which comes from Test-Driven Development, TDD. When applying BDD, we write our tests first and then only enough code to pass our tests and then refactor and verify the tests still pass exactly as we would with TDD. This cycle continues and is often referred to as red-green development of writing tests that fail and enough code to make them pass, then restarting the process.

This article was originally published in the May 2020 issue of php[architect] magazine. To read the complete article please subscribe or purchase the complete issue.

Leave a comment

Use the form below to leave a comment: