Skip to content

Latest commit

 

History

History
100 lines (56 loc) · 1.96 KB

development_environment.md

File metadata and controls

100 lines (56 loc) · 1.96 KB

Development Environment

The most easy way to set up the project is to install Docker and Docker Composer and build the project.

Configure

The configuration is shipped with a distribution environment file allowing you to customize your IDE and XDebug settings as well as your current user/group ID:

$ cp .env.dist .env

The most important part is the USER_ID and GROUP_ID which should match your current user/group.

Build

Once you have configured your environment, you can build the project:

$ docker-compose build

Composer

Install the dependencies via Composer:

$ docker-compose run --rm php composer install

Tests

To run the test suite, you can use:

$ docker-compose up -d

Composer install:

$ docker-compose run --rm php composer install

To run phpunit:

$ docker-compose run --rm php vendor/bin/phpunit

XDebug

If you want to use XDebug, make sure you have fully configured your .env file and use:

$ docker-compose run --rm -e XDEBUG=1 php vendor/bin/phpunit

Tests with PHP Storm integration

Configure PHP Storm for Docker (just create your config):

alt text

Create a Docker Compose Remote CLI Interpreter:

Preferences > Language & Frameworks > PHP

alt text

Your Config should look like this:

alt text

You are ready to start testing:

alt text

At first time it takes some time to build containers

alt text

Test results

alt text

Observe Selenium Tests

Get a VNC Client like VNC Viewer

Start yout Test Environment and connect the viewer to localhost:5900

If you get asked for a password it's secret