this assumes you already have PHP >= 5.3 and Composer installed
laravel new <project name>
cd <project name>
composer require codeception/codeception --dev
composer exec codecept bootstrap
<-- this will create yourtests
folder and files
cp .env .env.testing
This demo uses PhantomJS as the browser for accemptance tests.
It can be installed via download from their website, http://phantomjs.org/ or via
brew install phantomjs
Change the browser:
in your acceptance.suite.yml
to phantomjs
We used the Cest
style test in this application, which you can generate with the composer exec codecept generate:cest suitename CestName
command.
Example test can be found at tests/acceptance/CancelBtnCest.php
Start PhantomJS
phantomjs --webdriver=4444
<-- starts phantomjs on port 4444
Run Codeception Test
composer exec codecept run tests/acceptance/CancelBtnCest.php