#PHP CI test environment with Docker
This project creates a local test environment to test your code against multiple PHP version. Supports PHPUnit and Behat with Selenium (test example files are included), but can support easily other test tools.
##Requirements
- Composer (get Composer)
- Docker www.docker.com
##Installation
- Checkout the project.
- Run
composer install.
- Edit the
docker/shared.sh
file if you want to add additional PHP extension your project requires. - Edit the
bin/test.sh
file inserting your own test procedure.
Note: For Behat, Mink and Selenium, remember to add
wd_host: selenium:4444
to your Behat configuration file (seebehat.yaml.dist
for an example).
##Usage
./bin/app selenium
to run a Selenium standalone Server, this commands should be run only once, then stop and start the server withdocker selenium stop
anddocker selenium start
./bin/app init
to share thedocker/shared.sh
file inside all the Docker PHP containers./bin/app build
to build all the Docker PHP images./bin/app test
to run the test
Note: You don't need to run
app init
andapp build
every time, but only at the beginning of the project and everytime you change thedocker/shared.sh
file.