Like Behat, phpspec is an open source and free testing framework based on the notion of BDD. However, its approach to testing is quite different than that of Behat; we may even say it sits somewhere in the middle of PHPUnit and Behat. Unlike Behat, phpspec does not use the Gherkin format stories to describe its tests. Doing so, phpspec shifts its focus on internal, rather than external application behavior. Much like PHPUnit, phpspec allows us to instantiate objects, call its methods, and perform various assertions on the results. The part where it differs is in its "think of specification", and not of "think of test" approach.
Much like PHPUnit and Behat, phpspec can be installed as a tool and a library. The tool version being the .phar
archive, we can download it from the official GitHub repository, whereas the library version comes packed as a Composer package.
Assuming that we are using the Ubuntu 16.10 (Yakkety Yak) installation, installing phpspec as a tool...