Skip to content

Commit

Permalink
Update phpunit config
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-schranz committed Jul 16, 2024
1 parent 4883953 commit 45c1152
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 13 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/test-application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,19 @@ jobs:
include:
- php-version: '7.2'
dependency-versions: 'lowest'
phpunit-config: 'phpunit-9.xml.dist'

- php-version: '7.4'
dependency-versions: 'highest'
phpunit-config: 'phpunit-9.xml.dist'

- php-version: '8.0'
dependency-versions: 'highest'
phpunit-config: 'phpunit-9.xml.dist'

- php-version: '8.1'
dependency-versions: 'highest'
phpunit-config: 'phpunit-9.xml.dist'

- php-version: '8.2'
dependency-versions: 'highest'
Expand Down Expand Up @@ -74,7 +78,7 @@ jobs:
run: composer bootstrap-test-environment

- name: Execute test cases
run: composer test
run: composer test -- --config ${{ matrix.phpunit-config }}

lint:
name: 'PHP Lint'
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
/app/phpunit.xml
/phpunit.xml
.phpunit.result.cache
.phpunit.cache/

# composer
/composer.phar
Expand Down
24 changes: 24 additions & 0 deletions phpunit-9.xml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="Tests/bootstrap.php" colors="true">
<testsuites>
<testsuite name="SuluAutomationBundle Test Suite">
<directory>./Tests</directory>
</testsuite>
</testsuites>

<filter>
<whitelist>
<directory>./</directory>
<exclude>
<directory>Resources/</directory>
<directory>Tests/</directory>
<directory>vendor/</directory>
</exclude>
</whitelist>
</filter>

<php>
<env name="KERNEL_CLASS" value="Sulu\Bundle\AutomationBundle\Tests\Application\Kernel"/>
<env name="APP_ENV" value="test" force="true"/>
</php>
</phpunit>
28 changes: 16 additions & 12 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,24 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="Tests/bootstrap.php" colors="true">
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
bootstrap="Tests/bootstrap.php"
colors="true"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
cacheDirectory=".phpunit.cache">
<testsuites>
<testsuite name="SuluAutomationBundle Test Suite">
<directory>./Tests</directory>
</testsuite>
</testsuites>

<filter>
<whitelist>
<directory>./</directory>
<exclude>
<directory>Resources/</directory>
<directory>Tests/</directory>
<directory>vendor/</directory>
</exclude>
</whitelist>
</filter>

<php>
<env name="KERNEL_CLASS" value="Sulu\Bundle\AutomationBundle\Tests\Application\Kernel"/>
<env name="APP_ENV" value="test" force="true"/>
</php>

<source>
<include>
<directory>./</directory>
</include>
<exclude>
<directory>Resources/</directory>
<directory>Tests/</directory>
<directory>vendor/</directory>
</exclude>
</source>
</phpunit>

0 comments on commit 45c1152

Please sign in to comment.