Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHPUnit tweaks #1628

Merged
merged 5 commits into from
Oct 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ jobs:
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"
ini-values: error_reporting=-1, display_errors=On, zend.assertions=1

- name: "Reset composer platform"
if: matrix.php-version == '7.2' || matrix.php-version == '7.3' || matrix.php-version == '7.4'
Expand Down Expand Up @@ -77,6 +78,7 @@ jobs:
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"
ini-values: error_reporting=-1, display_errors=On, zend.assertions=1

- name: "Install dependencies"
uses: "ramsey/composer-install@v2"
Expand Down Expand Up @@ -152,6 +154,7 @@ jobs:
coverage: "none"
php-version: "${{ matrix.php-version }}"
extensions: mbstring
ini-values: error_reporting=-1, display_errors=On, zend.assertions=1

- name: "Reset composer platform"
if: matrix.php-version == '7.2' || matrix.php-version == '7.3' || matrix.php-version == '7.4' || matrix.php-version == '8.0'
Expand Down Expand Up @@ -188,6 +191,7 @@ jobs:
with:
coverage: "pcov"
php-version: "${{ matrix.php-version }}"
ini-values: error_reporting=-1, display_errors=On, zend.assertions=1

- name: "Install dependencies"
uses: "ramsey/composer-install@v2"
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
/phpunit.xml
/temp
/vendor
/.phpunit.result.cache
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"phpstan/phpstan-deprecation-rules": "1.1.4",
"phpstan/phpstan-phpunit": "1.3.14",
"phpstan/phpstan-strict-rules": "1.5.1",
"phpunit/phpunit": "7.5.20|8.5.21|9.6.8|10.3.5"
"phpunit/phpunit": "8.5.21|9.6.8|10.3.5"
},
"autoload": {
"psr-4": {
Expand Down
13 changes: 11 additions & 2 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.0/phpunit.xsd"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.3/phpunit.xsd"
bootstrap="tests/bootstrap.php"
colors="true"
backupGlobals="false"
Expand All @@ -13,16 +13,25 @@
stopOnDefect="true"
executionOrder="defects"
cacheDirectory="temp/phpunit-cache"
displayDetailsOnTestsThatTriggerErrors="true"
displayDetailsOnTestsThatTriggerWarnings="true"
displayDetailsOnTestsThatTriggerNotices="true"
displayDetailsOnTestsThatTriggerDeprecations="true"
failOnWarning="true"
failOnNotice="true"
failOnDeprecation="true"
>
<testsuites>
<testsuite name="Slevomat Coding Standard">
<directory suffix="Test.php">./tests/</directory>
</testsuite>
</testsuites>
<coverage>
<source>
<include>
<directory suffix=".php">SlevomatCodingStandard</directory>
</include>
</source>
<coverage>
<report>
<clover outputFile="temp/coverage.xml"/>
<html outputDirectory="temp/coverage"/>
Expand Down