File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Tests
2+
3+ on :
4+ pull_request :
5+ push :
6+ branches :
7+ - main
8+
9+ jobs :
10+ test :
11+ name : Tests
12+ runs-on : ubuntu-latest
13+
14+ steps :
15+ - name : Checkout repo
16+ uses : actions/checkout@v4
17+
18+ - name : Configure PHP
19+ uses : shivammathur/setup-php@v2
20+ with :
21+ php-version : 8.2
22+ tools : composer:v2
23+
24+ - name : Install dependencies
25+ run : composer install --prefer-dist --no-progress
26+
27+ - name : Running unit test
28+ run : composer phpunit
Original file line number Diff line number Diff line change 2424 "Dbout\\ WpHook\\ " : " src/"
2525 }
2626 },
27+ "autoload-dev" : {
28+ "psr-4" : {
29+ "Dbout\\ WpHook\\ Tests\\ " : " tests/"
30+ }
31+ },
2732 "require" : {
2833 "php" : " >=8.2" ,
2934 "psr/cache" : " ^1.0|^2.0|^3.0"
3439 "friendsofphp/php-cs-fixer" : " ^3.65" ,
3540 "roots/wordpress" : " ^6.7" ,
3641 "szepeviktor/phpstan-wordpress" : " ^2.0" ,
37- "phpstan/extension-installer" : " ^1.4"
42+ "phpstan/extension-installer" : " ^1.4" ,
43+ "phpunit/phpunit" : " ^12.0"
3844 },
3945 "scripts" : {
4046 "rector" : " vendor/bin/rector process src --dry-run" ,
4147 "phpstan" : " vendor/bin/phpstan analyse -c phpstan.neon" ,
4248 "csFixer:check" : " vendor/bin/php-cs-fixer fix --verbose --diff --dry-run" ,
43- "csFixer" : " vendor/bin/php-cs-fixer fix"
49+ "csFixer" : " vendor/bin/php-cs-fixer fix" ,
50+ "phpunit" : " vendor/bin/phpunit"
4451 },
4552 "config" : {
4653 "allow-plugins" : {
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2+ <phpunit cacheResult =" false" stopOnError =" true" >
3+ <testsuites >
4+ <testsuite name =" Tests" >
5+ <directory >tests/</directory >
6+ </testsuite >
7+ </testsuites >
8+ </phpunit >
You can’t perform that action at this time.
0 commit comments