Skip to content

Commit

Permalink
Use PHPUnit directly
Browse files Browse the repository at this point in the history
  • Loading branch information
johnstevenson committed Mar 18, 2024
1 parent 04aaa11 commit 0755533
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 21 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,11 @@ jobs:
- name: Install latest dependencies
run: composer update ${{ env.COMPOSER_FLAGS }}

# Provides flexibilty for using either simple-phpunit or phpunit
- name: Determine PHPUnit binary
run: |
name=$([ -f vendor/bin/simple-phpunit ] && echo simple-phpunit || echo phpunit)
echo "BIN_PHPUNIT=vendor/bin/$name" >> $GITHUB_ENV
shell: bash

- name: Run tests
run: ${{ env.BIN_PHPUNIT }} --verbose
if: ${{ !matrix.experimental }}
run: vendor/bin/phpunit

# Show deprecations on PHP 8.4
- name: Run tests (experimental)
if: ${{ matrix.experimental }}
run: vendor/bin/phpunit --display-deprecations
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
"composer/pcre": "^1 || ^2 || ^3"
},
"require-dev": {
"symfony/phpunit-bridge": "^6.0",
"phpstan/phpstan": "^1.0",
"phpstan/phpstan-strict-rules": "^1.1"
"phpstan/phpstan-strict-rules": "^1.1",
"phpunit/phpunit": "^8.5 || ^9.6 || ^10.5"
},
"autoload": {
"psr-4": {
Expand All @@ -38,7 +38,7 @@
}
},
"scripts": {
"test": "@php vendor/bin/simple-phpunit",
"test": "@php vendor/bin/phpunit",
"phpstan": "@php vendor/bin/phpstan analyse"
}
}
14 changes: 4 additions & 10 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
bootstrap="vendor/autoload.php"
>
<phpunit
colors="true"
bootstrap="vendor/autoload.php"
>
<testsuites>
<testsuite name="XdebugHandler Test Suite">
<directory>tests</directory>
Expand Down

0 comments on commit 0755533

Please sign in to comment.