Skip to content

Commit

Permalink
Add PHPUnit as dev dependency
Browse files Browse the repository at this point in the history
This makes it easier to run the tests locally.
  • Loading branch information
ruudk committed Nov 25, 2024
1 parent 492e27e commit fd83ca1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,14 @@ jobs:
coverage: "none"
php-version: ${{ matrix.php-version }}
ini-values: memory_limit=-1
tools: phpunit:11.3

- name: "Add PHPUnit matcher"
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"

- run: composer install

- name: "Run tests"
run: phpunit
run: vendor/bin/phpunit

extension-tests:
needs:
Expand Down Expand Up @@ -79,7 +78,6 @@ jobs:
coverage: "none"
php-version: ${{ matrix.php-version }}
ini-values: memory_limit=-1
tools: phpunit:11.3

- name: "Add PHPUnit matcher"
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
Expand All @@ -97,7 +95,7 @@ jobs:
working-directory: extra/${{ matrix.extension }}
env:
LANG: 'en_US.UTF-8'
run: phpunit
run: vendor/bin/phpunit

integration-tests:
if: "false" # TODO re-enable that job when Drupal does not use features deprecated in 3.x anymore
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
},
"require-dev": {
"psr/container": "^1.0|^2.0",
"phpstan/phpstan": "^2.0"
"phpstan/phpstan": "^2.0",
"phpunit/phpunit": "^11.4"
},
"autoload": {
"psr-4" : {
Expand Down
2 changes: 1 addition & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
processIsolation="false"
stopOnFailure="false"
bootstrap="vendor/autoload.php"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.3/phpunit.xsd"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
cacheDirectory=".phpunit.cache"
backupStaticProperties="false"
failOnDeprecation="true"
Expand Down

0 comments on commit fd83ca1

Please sign in to comment.