Skip to content

Commit

Permalink
Add PHPUnit bridge
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-schranz committed Jul 25, 2024
1 parent 7843c2f commit 7d14cd5
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/test-application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
php-extensions: 'ctype, iconv, mysql, imagick'
tools: 'composer:v2'
lint: false
phpunit-config: 'phpunit-9.xml.dist'
env:
SYMFONY_DEPRECATIONS_HELPER: weak

Expand Down Expand Up @@ -101,5 +102,5 @@ jobs:
env: ${{ matrix.env }}

- name: Execute test cases
run: time composer test
run: time composer test -- --config ${{ matrix.phpunit-config || 'phpunit.xml.dist' }}
env: ${{ matrix.env }}
23 changes: 23 additions & 0 deletions phpunit-9.xml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- https://phpunit.de/manual/current/en/appendixes.configuration.html -->
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/6.1/phpunit.xsd"
colors="true"
bootstrap="Tests/bootstrap.php"
>
<testsuites>
<testsuite name="SuluSyliusConsumerBundle Test Suite">
<directory>Tests/</directory>
</testsuite>
</testsuites>

<filter>
<whitelist>
<directory>./</directory>
</whitelist>
</filter>

<php>
<env name="KERNEL_CLASS" value="Sulu\Bundle\SyliusConsumerBundle\Tests\Application\Kernel"/>
</php>
</phpunit>
16 changes: 14 additions & 2 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,30 @@
bootstrap="Tests/bootstrap.php"
>
<testsuites>
<testsuite name="SuluSyliusConsumerBundle Test Suite">
<directory>Tests/</directory>
<testsuite name="Sulu Sylius Consumer Bundle">
<directory>./Tests</directory>
</testsuite>
</testsuites>

<filter>
<whitelist addUncoveredFilesFromWhitelist="true">
<directory>.</directory>
<exclude>
<directory>Resources/</directory>
<directory>Tests/</directory>
<directory>vendor/</directory>
</exclude>
</whitelist>
</filter>

<filter>
<whitelist>
<directory>./</directory>
</whitelist>
</filter>

<php>
<env name="APP_ENV" value="test"/>
<env name="KERNEL_CLASS" value="Sulu\Bundle\SyliusConsumerBundle\Tests\Application\Kernel"/>
</php>
</phpunit>

0 comments on commit 7d14cd5

Please # to comment.