While phpspec follows the BDD by specification and is useful for specification and design in isolation, its complimentary tool Behat is used for integration and functional tests. Since phpspec suggests to mock everything, database queries wouldn’t actually be executed, as the database is outside the context of that method. Behat is a great tool to perform behavioral testing on a certain feature. While phpspec is already included among Laravel 5’s dependencies, Behat will be installed as an external module.

The following command should be run to install and make Behat work with Laravel 5:

$ composer require behat/behat behat/mink behat/mink-extension laracasts/behat-laravel-extension --dev