Skip to content

Commit

Permalink
Add Arch tests
Browse files Browse the repository at this point in the history
  • Loading branch information
roxblnfk committed Apr 5, 2024
1 parent d95c27b commit 3ff4de8
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/run-test-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,4 @@ jobs:
run: composer update --no-interaction --no-progress

- name: Run tests
run: vendor/bin/phpunit --testsuite=${{ inputs.test-suite }} --testdox
run: vendor/bin/pest --testdox
9 changes: 8 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@
"buggregator/trap": "^1.4",
"dereuromark/composer-prefer-lowest": "^0.1.10",
"phpunit/phpunit": "^10.5",
"vimeo/psalm": "^5.23"
"vimeo/psalm": "^5.23",
"pestphp/pest": "^2.34",
"pestphp/pest-plugin-arch": "^2.7"
},
"config": {
"allow-plugins": {
"pestphp/pest-plugin": false
}
}
}
3 changes: 3 additions & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
<testsuite name="Unit">
<directory>tests/Unit</directory>
</testsuite>
<testsuite name="Arch">
<directory>tests/Arch</directory>
</testsuite>
</testsuites>
<source>
<include>
Expand Down
8 changes: 8 additions & 0 deletions tests/Arch/DebugTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php

declare(strict_types=1);

arch("Forgotten functions")
->expect(['trap', 'dd', 'dump', 'exit', 'die', 'print_r', 'var_dump', 'echo', 'print', 'sleep', 'usleep'])
->not
->toBeUsed();

0 comments on commit 3ff4de8

Please sign in to comment.