Added test environment

This commit is contained in:
Kevin Frantz 2018-07-14 10:44:39 +02:00
parent c2fe35a8a5
commit 72f6a71839
3 changed files with 28 additions and 1 deletions

View File

@ -29,7 +29,12 @@ existing colors.
- Please cover your code with unit tests. - Please cover your code with unit tests.
## start ## start
To run the program execute To run the program execute:
```bash ```bash
docker-compose up -d docker-compose up -d
``` ```
## test
To run the tests execute:
```bash
test.sh
```

20
src/phpunit.xml Normal file
View File

@ -0,0 +1,20 @@
<phpunit bootstrap="./vendor/autoload.php">
<testsuites>
<testsuite name="Controllers">
<directory>./controller/</directory>
<file>*Test.php</file>
</testsuite>
<testsuite name="Core">
<directory>./core/</directory>
<file>*Test.php</file>
</testsuite>
<testsuite name="Entities">
<directory>./entity/</directory>
<file>*Test.php</file>
</testsuite>
<testsuite name="Repositories">
<directory>./repository/</directory>
<file>*Test.php</file>
</testsuite>
</testsuites>
</phpunit>

2
test.sh Normal file
View File

@ -0,0 +1,2 @@
#!/bin/bash
(cd ./src && php -d memory_limit=128M vendor/bin/phpunit)