PHPSpec

(( gitHubWatchers )) (( gitHubStars )) (( gitHubForks ))

PHPSpec is a tool which can help you write clean and working PHP code using Behaviour Driven Development (BDD).

BDD is a technique derived from test-first development. BDD is a technique used at story level and spec level. phpspec is a tool for use at the spec level or SpecBDD. The technique is to first use a tool like phpspec to describe the behaviour of an object you are about to write. Next you write just enough code to meet that specification and finally you refactor this code.

Installation

Install from a Composer package as a dev dependency (with Composer)

Make sure you have Composer and all dependencies {"label"=>"prophecy"} installed.

Require it as a dev dependency:
composer require --dev phpspec/phpspec
Run it:
php vendor/bin/phpspec