Behat
Behat is an open source and free testing framework based on a notion of behavior-driven development (BDD). The great benefit of the BDD frameworks, including Behat, is that a significant portion of the functional documentation gets poured into the actual user stories we end up testing. That is, to some extent, the documentation itself becomes a test.
Setting up Behat
Much like PHPUnit, Behat can be installed as a tool and library. The tool version being the .phar
archive, we can download it from the official GitHub repository, where the library version comes packed as a Composer package.
Assuming that we are using the Ubuntu 16.10 (Yakkety Yak) installation, installing the Behat as a tool is easy through the following commands:
wget https://github.com/Behat/Behat/releases/download/v3.3.0/behat.phar chmod +x behat.phar sudo mv behat.phar /usr/local/bin/behat behat --version
This should give us the following output:
Installing Behat as a library is as easy as running the following console...