Skip to content

Commit 3ff4de8

Browse files
committed
Add Arch tests
1 parent d95c27b commit 3ff4de8

4 files changed

Lines changed: 20 additions & 2 deletions

File tree

.github/workflows/run-test-suite.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,4 +107,4 @@ jobs:
107107
run: composer update --no-interaction --no-progress
108108

109109
- name: Run tests
110-
run: vendor/bin/phpunit --testsuite=${{ inputs.test-suite }} --testdox
110+
run: vendor/bin/pest --testdox

composer.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,13 @@
4747
"buggregator/trap": "^1.4",
4848
"dereuromark/composer-prefer-lowest": "^0.1.10",
4949
"phpunit/phpunit": "^10.5",
50-
"vimeo/psalm": "^5.23"
50+
"vimeo/psalm": "^5.23",
51+
"pestphp/pest": "^2.34",
52+
"pestphp/pest-plugin-arch": "^2.7"
53+
},
54+
"config": {
55+
"allow-plugins": {
56+
"pestphp/pest-plugin": false
57+
}
5158
}
5259
}

phpunit.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
<testsuite name="Unit">
1818
<directory>tests/Unit</directory>
1919
</testsuite>
20+
<testsuite name="Arch">
21+
<directory>tests/Arch</directory>
22+
</testsuite>
2023
</testsuites>
2124
<source>
2225
<include>

tests/Arch/DebugTest.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
arch("Forgotten functions")
6+
->expect(['trap', 'dd', 'dump', 'exit', 'die', 'print_r', 'var_dump', 'echo', 'print', 'sleep', 'usleep'])
7+
->not
8+
->toBeUsed();

0 commit comments

Comments
 (0)