Writing acceptance tests using Codeception
Acceptance testing is a useful way to test that your application is outputting the correct information to the browser. Using a package such as Codeception, we can automate these tests.
Getting ready
For this recipe, we'll need a working copy of Laravel installed.
How to do it...
To complete this recipe, follow the given steps:
Open the
composer.json
file, and add the following line to ourrequire-dev
section:"codeception/codeception": "dev-master",
Open the command line window, and update the app with the following command:
php composer.phar update
After it is installed, we need to run the
bootstrap
command in the terminal, as shown in the following command:vendor/bin/codecept bootstrap app
In the
app/tests/acceptance
directory, create a file named asAviatorCept.php
using the following code:<?php $I = new WebGuy($scenario); $I->wantTo('Make sure all the blueprints are shown'); $I->amOnPage('/'); $I->see('All The Blueprints');
In our...