Skip to content

Commit 6aaea7b

Browse files
Fix PHPUnit GitHub actions (#388)
* Specify composer as the phpunit bootstrap The PHPUnit action says the [default bootstrap is vendor/autoload.php](https://github.com/marketplace/actions/phpunit-php-actions#inputs) but it seems that the composer autoload was not called. * Autoload CAS.php for tests The CAS.php file defines a number of constants used by tests. Because tests call directly into the underlying class and do not pass through the CAS.php entrypoint, these constants are not defined in tests.
1 parent 5182280 commit 6aaea7b

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ jobs:
3535
php_version: "${{ matrix.php-version.php }}"
3636
php_extensions: xdebug
3737
args: --verbose --coverage-clover=coverage.xml
38+
bootstrap: vendor/autoload.php
3839
env:
3940
XDEBUG_MODE: coverage
4041
- name: Report coverage

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
]
3737
},
3838
"autoload-dev" : {
39+
"files": ["source/CAS.php"],
3940
"psr-4" : {
4041
"PhpCas\\" : "test/CAS/"
4142
}

0 commit comments

Comments
 (0)