From 72f6a7183929aed5445d48666184c8eb007d0034 Mon Sep 17 00:00:00 2001 From: Kevin Frantz Date: Sat, 14 Jul 2018 10:44:39 +0200 Subject: [PATCH] Added test environment --- README.md | 7 ++++++- src/phpunit.xml | 20 ++++++++++++++++++++ test.sh | 2 ++ 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 src/phpunit.xml create mode 100644 test.sh diff --git a/README.md b/README.md index 189c7a4..932eaba 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,12 @@ existing colors. - Please cover your code with unit tests. ## start -To run the program execute +To run the program execute: ```bash docker-compose up -d ``` +## test +To run the tests execute: +```bash + test.sh +``` diff --git a/src/phpunit.xml b/src/phpunit.xml new file mode 100644 index 0000000..6ce9285 --- /dev/null +++ b/src/phpunit.xml @@ -0,0 +1,20 @@ + + + + ./controller/ + *Test.php + + + ./core/ + *Test.php + + + ./entity/ + *Test.php + + + ./repository/ + *Test.php + + + diff --git a/test.sh b/test.sh new file mode 100644 index 0000000..386ea52 --- /dev/null +++ b/test.sh @@ -0,0 +1,2 @@ +#!/bin/bash +(cd ./src && php -d memory_limit=128M vendor/bin/phpunit)