diff --git a/README-testing.md b/README-testing.md index 7a7c5b593..4238b6e48 100644 --- a/README-testing.md +++ b/README-testing.md @@ -29,8 +29,14 @@ To mirror the CI environment on your machine: docker compose -f docker-compose-test.yml up -d ``` -3. **Run the suites:** - * **PHPUnit:** `docker exec -it opencats_test_php ./vendor/bin/phpunit src/OpenCATS/Tests/IntegrationTests` +3. **Install PHP dependencies (Composer):** + ```bash + docker run --rm -v "$(pwd)/..":/app -w /app composer:2 composer install --no-interaction --prefer-dist --ignore-platform-reqs + ``` + +4. **Run the suites:** + * **PHPUnit Unit Tests:** `docker exec -it opencats_test_php ./vendor/bin/phpunit src/OpenCATS/Tests/UnitTests` + * **PHPUnit Integration Tests:** `docker exec -it opencats_test_php ./vendor/bin/phpunit src/OpenCATS/Tests/IntegrationTests` * **Behat:** `docker exec -it opencats_test_php ./vendor/bin/behat -c ./test/behat.yml` --- diff --git a/docker/docker-compose-test.yml b/docker/docker-compose-test.yml index cbe6fb490..2d728bcd3 100644 --- a/docker/docker-compose-test.yml +++ b/docker/docker-compose-test.yml @@ -12,6 +12,7 @@ services: php: container_name: opencats_test_php image: opencats/php-base:7.2-fpm-alpine + working_dir: /var/www/public volumes_from: - opencatsdata