Skip to content

Commit

Permalink
Merge pull request #1327 from Koen1999/moretests
Browse files Browse the repository at this point in the history
Added more tests
  • Loading branch information
tomudding authored Dec 28, 2021
2 parents ea76a54 + 4e8253f commit 12d3e36
Show file tree
Hide file tree
Showing 36 changed files with 1,055 additions and 139 deletions.
22 changes: 0 additions & 22 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,6 @@ jobs:
name: PHPUnit
runs-on: ubuntu-latest

# Create a MySQL service.
services:
mysql:
image: mariadb
env:
MYSQL_ROOT_PASSWORD: gewis
MYSQL_DATABASE: gewis
MYSQL_USER: gewis
MYSQL_PASSWORD: gewis
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3

steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down Expand Up @@ -63,14 +50,5 @@ jobs:
with:
env-file: .env.dist

- name: Create database
# GitHub Actions do not support custom hostnames like in Docker, hence we need to overwrite this value.
# Furthermore, we cannot declare it above, as it will be overwritten by the previous step.
env:
DOCKER_DB_HOST: 127.0.0.1
run: ./orm orm:schema-tool:update --force

- name: Run PHPUnit
env:
DOCKER_DB_HOST: 127.0.0.1
run: vendor/phpunit/phpunit/phpunit --bootstrap bootstrap.php --configuration phpunit.xml
1 change: 1 addition & 0 deletions .idea/gewisweb.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/php-test-framework.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion .idea/php.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions .idea/phpunit.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 4 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,11 @@ updatedb: rundev
stop:
@docker-compose down

runtest: rundev
@docker-compose exec -T web ./vendor/phpunit/phpunit/phpunit --bootstrap ./bootstrap.php --configuration ./phpunit.xml
runtest:
./vendor/phpunit/phpunit/phpunit --bootstrap ./bootstrap.php --configuration ./phpunit.xml --stop-on-error --stop-on-failure

runcoverage: rundev
@docker-compose exec web ./vendor/phpunit/phpunit/phpunit --bootstrap ./bootstrap.php --configuration ./phpunit.xml --coverage-html ./coverage
@rm -r ./coverage
@docker cp gewisweb_web_1:/code/coverage ./coverage
runcoverage:
./vendor/phpunit/phpunit/phpunit --bootstrap ./bootstrap.php --configuration ./phpunit.xml --coverage-html ./coverage

getvendordir:
@rm -Rf ./vendor
Expand Down
3 changes: 3 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
"laminas/laminas-stdlib": "^3.6.1",
"laminas/laminas-validator": "^2.15.0",
"laminas/laminas-view": "^2.14.0",
"doctrine/dbal": "^3.0.0",
"doctrine/orm": "^2.10.3",
"doctrine/doctrine-module": "^4.3.0",
"doctrine/doctrine-orm-module": "^4.2.0",
Expand All @@ -80,6 +81,7 @@
"cweagans/composer-patches": "^1.7.1"
},
"require-dev": {
"ext-pdo_sqlite": "*",
"ext-simplexml": "*",
"ext-xdebug": "^3.0.0",
"laminas/laminas-component-installer": "^2.6.0",
Expand Down Expand Up @@ -163,6 +165,7 @@
"ActivityTest\\": "module/Activity/test",
"ApplicationTest\\": "module/Application/test",
"CompanyTest\\": "module/Company/test",
"DecisionTest\\": "module/Decision/test",
"EducationTest\\": "module/Education/test",
"FrontpageTest\\": "module/Frontpage/test",
"PhotoTest\\": "module/Photo/test",
Expand Down
53 changes: 27 additions & 26 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 13 additions & 13 deletions docker/glide/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified docker/glide/composer.phar
Binary file not shown.
Loading

0 comments on commit 12d3e36

Please sign in to comment.