Skip to content

Commit

Permalink
[TASK] Update phpunit configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
a-r-m-i-n committed May 27, 2023
1 parent 00eccab commit 1d4b72b
Show file tree
Hide file tree
Showing 6 changed files with 576 additions and 741 deletions.
34 changes: 8 additions & 26 deletions .build/phpunit-functional.xml
Original file line number Diff line number Diff line change
@@ -1,42 +1,24 @@
<phpunit
backupGlobals="true"
backupStaticAttributes="false"
cacheResultFile=".cache/.phpunit-functional.result.cache"
colors="true"
convertErrorsToExceptions="false"
convertWarningsToExceptions="false"
convertNoticesToExceptions="false"
forceCoversAnnotation="false"
processIsolation="false"
stopOnError="false"
stopOnFailure="false"
stopOnIncomplete="false"
stopOnSkipped="false"
verbose="false">

<?xml version="1.0"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="true" colors="true" processIsolation="false" stopOnError="false" stopOnFailure="false" stopOnIncomplete="false" stopOnSkipped="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.1/phpunit.xsd" cacheDirectory=".phpunit.cache" backupStaticProperties="false" requireCoverageMetadata="false">
<testsuites>
<testsuite name="Functional">
<directory>../tests/Functional</directory>
</testsuite>
</testsuites>

<coverage cacheDirectory=".cache/coverage-functional"
includeUncoveredFiles="false"
processUncoveredFiles="false"
pathCoverage="false">
<include>
<directory suffix=".php">../src</directory>
</include>
<coverage includeUncoveredFiles="false" pathCoverage="false">
<report>
<clover outputFile="reports/coverage-functional.xml"/>
<html outputDirectory="reports/coverage-functional" lowUpperBound="50" highLowerBound="90"/>
<text outputFile="reports/coverage-functional.txt" showUncoveredFiles="false" showOnlySummary="true"/>
</report>
</coverage>

<logging>
<junit outputFile="reports/phpunit-functional-results.xml"/>
<testdoxText outputFile="reports/phpunit-functional-results.txt"/>
</logging>

<source>
<include>
<directory suffix=".php">../src</directory>
</include>
</source>
</phpunit>
42 changes: 42 additions & 0 deletions .build/phpunit-functional.xml.bak
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<phpunit
backupGlobals="true"
backupStaticAttributes="false"
cacheResultFile=".cache/.phpunit-functional.result.cache"
colors="true"
convertErrorsToExceptions="false"
convertWarningsToExceptions="false"
convertNoticesToExceptions="false"
forceCoversAnnotation="false"
processIsolation="false"
stopOnError="false"
stopOnFailure="false"
stopOnIncomplete="false"
stopOnSkipped="false"
verbose="false">

<testsuites>
<testsuite name="Functional">
<directory>../tests/Functional</directory>
</testsuite>
</testsuites>

<coverage cacheDirectory=".cache/coverage-functional"
includeUncoveredFiles="false"
processUncoveredFiles="false"
pathCoverage="false">
<include>
<directory suffix=".php">../src</directory>
</include>
<report>
<clover outputFile="reports/coverage-functional.xml"/>
<html outputDirectory="reports/coverage-functional" lowUpperBound="50" highLowerBound="90"/>
<text outputFile="reports/coverage-functional.txt" showUncoveredFiles="false" showOnlySummary="true"/>
</report>
</coverage>

<logging>
<junit outputFile="reports/phpunit-functional-results.xml"/>
<testdoxText outputFile="reports/phpunit-functional-results.txt"/>
</logging>

</phpunit>
33 changes: 8 additions & 25 deletions .build/phpunit-unit.xml
Original file line number Diff line number Diff line change
@@ -1,41 +1,24 @@
<phpunit
backupGlobals="true"
backupStaticAttributes="false"
cacheResultFile=".cache/.phpunit-unit.result.cache"
colors="true"
convertErrorsToExceptions="true"
convertWarningsToExceptions="true"
forceCoversAnnotation="false"
processIsolation="false"
stopOnError="false"
stopOnFailure="false"
stopOnIncomplete="false"
stopOnSkipped="false"
verbose="false">

<?xml version="1.0"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="true" colors="true" processIsolation="false" stopOnError="false" stopOnFailure="false" stopOnIncomplete="false" stopOnSkipped="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.1/phpunit.xsd" cacheDirectory=".phpunit.cache" backupStaticProperties="false" requireCoverageMetadata="false">
<testsuites>
<testsuite name="Unit">
<directory>../tests/Unit</directory>
</testsuite>
</testsuites>

<coverage cacheDirectory=".cache/coverage-unit"
includeUncoveredFiles="false"
processUncoveredFiles="false"
pathCoverage="false">
<include>
<directory suffix=".php">../src</directory>
</include>
<coverage includeUncoveredFiles="false" pathCoverage="false">
<report>
<clover outputFile="reports/coverage-unit.xml"/>
<html outputDirectory="reports/coverage-unit" lowUpperBound="50" highLowerBound="90"/>
<text outputFile="reports/coverage-unit.txt" showUncoveredFiles="false" showOnlySummary="true"/>
</report>
</coverage>

<logging>
<junit outputFile="reports/phpunit-unit-results.xml"/>
<testdoxText outputFile="reports/phpunit-unit-results.txt"/>
</logging>

<source>
<include>
<directory suffix=".php">../src</directory>
</include>
</source>
</phpunit>
41 changes: 41 additions & 0 deletions .build/phpunit-unit.xml.bak
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<phpunit
backupGlobals="true"
backupStaticAttributes="false"
cacheResultFile=".cache/.phpunit-unit.result.cache"
colors="true"
convertErrorsToExceptions="true"
convertWarningsToExceptions="true"
forceCoversAnnotation="false"
processIsolation="false"
stopOnError="false"
stopOnFailure="false"
stopOnIncomplete="false"
stopOnSkipped="false"
verbose="false">

<testsuites>
<testsuite name="Unit">
<directory>../tests/Unit</directory>
</testsuite>
</testsuites>

<coverage cacheDirectory=".cache/coverage-unit"
includeUncoveredFiles="false"
processUncoveredFiles="false"
pathCoverage="false">
<include>
<directory suffix=".php">../src</directory>
</include>
<report>
<clover outputFile="reports/coverage-unit.xml"/>
<html outputDirectory="reports/coverage-unit" lowUpperBound="50" highLowerBound="90"/>
<text outputFile="reports/coverage-unit.txt" showUncoveredFiles="false" showOnlySummary="true"/>
</report>
</coverage>

<logging>
<junit outputFile="reports/phpunit-unit-results.xml"/>
<testdoxText outputFile="reports/phpunit-unit-results.txt"/>
</logging>

</phpunit>
7 changes: 1 addition & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@
"issues": "https://github.com/a-r-m-i-n/editorconfig-cli/issues",
"source": "https://github.com/a-r-m-i-n/editorconfig-cli"
},
"config": {
"platform": {
"php": "7.3.25"
}
},
"require": {
"php": "^7.3 | ^8.0",
"ext-json": "*",
Expand All @@ -35,7 +30,7 @@
"phpstan/phpstan": "1.4.0",
"jangregor/phpstan-prophecy": "1.0.0",
"friendsofphp/php-cs-fixer": "3.4.0",
"phpunit/phpunit": "^9.5"
"phpunit/phpunit": "^9.5 || ^10.1"
},
"bin": [
"bin/ec"
Expand Down
Loading

0 comments on commit 1d4b72b

Please sign in to comment.