File tree Expand file tree Collapse file tree 10 files changed +52
-81
lines changed Expand file tree Collapse file tree 10 files changed +52
-81
lines changed Original file line number Diff line number Diff line change @@ -32,15 +32,13 @@ jobs:
3232
3333 - name : Run test suite
3434 run : |
35- mkdir -p ./coverage/php-${{ matrix.php-version }}
36- ./vendor/bin/phpunit --configuration ./phpunit-${{ matrix.php-version }}.xml --coverage-clover ./coverage/php-${{ matrix.php-version }}/coverage.clover --coverage-html ./coverage/php-${{ matrix.php-version }}/html/
37-
38- - name : Get current date/time
39- id : date
40- run : echo "::set-output name=date::$(date +'%Y%m%d-%H%M')"
35+ mkdir ./coverage
36+ php -v > ./coverage/php${{ matrix.php-version }}_output.txt && echo '' >> ./coverage/php${{ matrix.php-version }}_output.txt
37+ ./vendor/bin/phpunit --configuration ./tests/phpunit-${{ matrix.php-version }}.xml --coverage-clover ./coverage/php${{ matrix.php-version }}_coverage.clover >> ./coverage/php${{ matrix.php-version }}_output.txt
38+ cat ./coverage/php${{ matrix.php-version }}_output.txt
4139
4240 - name : Save coverage results
4341 uses : actions/upload-artifact@v3
4442 with :
45- name : coverage_php -array-to-xml_${{ steps.date.outputs.date }}
43+ name : coverage_clover_php -array-to-xml
4644 path : ./coverage
Original file line number Diff line number Diff line change @@ -456,3 +456,15 @@ Result (prettified):
456456 <RealNull >__NULL__</RealNull >
457457</root >
458458```
459+
460+ # PHPUnit Tests
461+ Use a specific configuration file, depending on your php version:
462+ ```
463+ ./vendor/bin/phpunit --configuration ./tests/phpunit-7.0.xml
464+ ./vendor/bin/phpunit --configuration ./tests/phpunit-7.1.xml
465+ ./vendor/bin/phpunit --configuration ./tests/phpunit-7.2.xml
466+ ./vendor/bin/phpunit --configuration ./tests/phpunit-7.3.xml
467+ ./vendor/bin/phpunit --configuration ./tests/phpunit-7.4.xml
468+ ./vendor/bin/phpunit --configuration ./tests/phpunit-8.0.xml
469+ ./vendor/bin/phpunit --configuration ./tests/phpunit-8.1.xml
470+ ```
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 22<!-- PHPUnit 6 PHP 7.0 - PHP 7.2 (https://phpunit.de/supported-versions.html) -->
33<phpunit backupGlobals =" false"
44 backupStaticAttributes =" false"
5- bootstrap =" vendor/autoload.php"
5+ bootstrap =" ./../ vendor/autoload.php"
66 colors =" true"
77 convertErrorsToExceptions =" true"
88 convertNoticesToExceptions =" true"
99 convertWarningsToExceptions =" true"
1010 processIsolation =" false"
1111 stopOnFailure =" false"
1212 syntaxCheck =" false" >
13-
1413 <filter >
1514 <whitelist >
16- <directory >./src</directory >
15+ <directory >./../ src</directory >
1716 <exclude >
18- <directory >./vendor</directory >
19- <directory >./tests</directory >
17+ <directory >./../ vendor</directory >
18+ <directory >./../ tests</directory >
2019 </exclude >
2120 </whitelist >
2221 </filter >
23-
2422 <testsuites >
2523 <testsuite name =" PhpArrayToXml Test Suite" >
26- <directory >./tests/</directory >
24+ <directory >./../ tests/</directory >
2725 </testsuite >
2826 </testsuites >
29-
3027</phpunit >
Original file line number Diff line number Diff line change 22<!-- PHPUnit 7 PHP 7.1 - PHP 7.3 (https://phpunit.de/supported-versions.html) -->
33<phpunit backupGlobals =" false"
44 backupStaticAttributes =" false"
5- bootstrap =" vendor/autoload.php"
5+ bootstrap =" ./../ vendor/autoload.php"
66 colors =" true"
77 convertErrorsToExceptions =" true"
88 convertNoticesToExceptions =" true"
99 convertWarningsToExceptions =" true"
1010 processIsolation =" false"
1111 stopOnFailure =" false" >
12-
1312 <filter >
1413 <whitelist >
15- <directory >./src</directory >
14+ <directory >./../ src</directory >
1615 <exclude >
17- <directory >./vendor</directory >
18- <directory >./tests</directory >
16+ <directory >./../ vendor</directory >
17+ <directory >./../ tests</directory >
1918 </exclude >
2019 </whitelist >
2120 </filter >
22-
2321 <testsuites >
2422 <testsuite name =" PhpArrayToXml Test Suite" >
25- <directory >./tests/</directory >
23+ <directory >./../ tests/</directory >
2624 </testsuite >
2725 </testsuites >
28-
2926</phpunit >
Original file line number Diff line number Diff line change 22<!-- PHPUnit 8 >= PHP 7.2 (https://phpunit.de/supported-versions.html) -->
33<phpunit backupGlobals =" false"
44 backupStaticAttributes =" false"
5- bootstrap =" vendor/autoload.php"
5+ bootstrap =" ./../ vendor/autoload.php"
66 colors =" true"
77 convertErrorsToExceptions =" true"
88 convertNoticesToExceptions =" true"
99 convertWarningsToExceptions =" true"
1010 processIsolation =" false"
1111 stopOnFailure =" false" >
12-
1312 <filter >
1413 <whitelist >
15- <directory >./src</directory >
14+ <directory >./../ src</directory >
1615 <exclude >
17- <directory >./vendor</directory >
18- <directory >./tests</directory >
16+ <directory >./../ vendor</directory >
17+ <directory >./../ tests</directory >
1918 </exclude >
2019 </whitelist >
2120 </filter >
22-
2321 <testsuites >
2422 <testsuite name =" PhpArrayToXml Test Suite" >
25- <directory >./tests/</directory >
23+ <directory >./../ tests/</directory >
2624 </testsuite >
2725 </testsuites >
28-
2926</phpunit >
Original file line number Diff line number Diff line change 44 xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
55 backupGlobals =" false"
66 backupStaticAttributes =" false"
7- bootstrap =" vendor/autoload.php"
7+ bootstrap =" ./../ vendor/autoload.php"
88 colors =" true"
99 convertErrorsToExceptions =" true"
1010 convertNoticesToExceptions =" true"
1515 xsi : noNamespaceSchemaLocation =" https://schema.phpunit.de/9.3/phpunit.xsd" >
1616 <coverage >
1717 <include >
18- <directory >./src</directory >
18+ <directory >./../ src</directory >
1919 </include >
2020 <exclude >
21- <directory >./vendor</directory >
22- <directory >./tests</directory >
21+ <directory >./../ vendor</directory >
22+ <directory >./../ tests</directory >
2323 </exclude >
2424 </coverage >
2525 <testsuites >
2626 <testsuite name =" PhpArrayToXml Test Suite" >
27- <directory >./tests/</directory >
27+ <directory >./../ tests/</directory >
2828 </testsuite >
2929 </testsuites >
3030</phpunit >
Original file line number Diff line number Diff line change 44 xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
55 backupGlobals =" false"
66 backupStaticAttributes =" false"
7- bootstrap =" vendor/autoload.php"
7+ bootstrap =" ./../ vendor/autoload.php"
88 colors =" true"
99 convertErrorsToExceptions =" true"
1010 convertNoticesToExceptions =" true"
1515 xsi : noNamespaceSchemaLocation =" https://schema.phpunit.de/9.3/phpunit.xsd" >
1616 <coverage >
1717 <include >
18- <directory >./src</directory >
18+ <directory >./../ src</directory >
1919 </include >
2020 <exclude >
21- <directory >./vendor</directory >
22- <directory >./tests</directory >
21+ <directory >./../ vendor</directory >
22+ <directory >./../ tests</directory >
2323 </exclude >
2424 </coverage >
2525 <testsuites >
2626 <testsuite name =" PhpArrayToXml Test Suite" >
27- <directory >./tests/</directory >
27+ <directory >./../ tests/</directory >
2828 </testsuite >
2929 </testsuites >
3030</phpunit >
Original file line number Diff line number Diff line change 44 xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
55 backupGlobals =" false"
66 backupStaticAttributes =" false"
7- bootstrap =" vendor/autoload.php"
7+ bootstrap =" ./../ vendor/autoload.php"
88 colors =" true"
99 convertErrorsToExceptions =" true"
1010 convertNoticesToExceptions =" true"
1515 xsi : noNamespaceSchemaLocation =" https://schema.phpunit.de/9.3/phpunit.xsd" >
1616 <coverage >
1717 <include >
18- <directory >./src</directory >
18+ <directory >./../ src</directory >
1919 </include >
2020 <exclude >
21- <directory >./vendor</directory >
22- <directory >./tests</directory >
21+ <directory >./../ vendor</directory >
22+ <directory >./../ tests</directory >
2323 </exclude >
2424 </coverage >
2525 <testsuites >
2626 <testsuite name =" PhpArrayToXml Test Suite" >
27- <directory >./tests/</directory >
27+ <directory >./../ tests/</directory >
2828 </testsuite >
2929 </testsuites >
3030</phpunit >
Original file line number Diff line number Diff line change 44 xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
55 backupGlobals =" false"
66 backupStaticAttributes =" false"
7- bootstrap =" vendor/autoload.php"
7+ bootstrap =" ./../ vendor/autoload.php"
88 colors =" true"
99 convertErrorsToExceptions =" true"
1010 convertNoticesToExceptions =" true"
1515 xsi : noNamespaceSchemaLocation =" https://schema.phpunit.de/9.3/phpunit.xsd" >
1616 <coverage >
1717 <include >
18- <directory >./src</directory >
18+ <directory >./../ src</directory >
1919 </include >
2020 <exclude >
21- <directory >./vendor</directory >
22- <directory >./tests</directory >
21+ <directory >./../ vendor</directory >
22+ <directory >./../ tests</directory >
2323 </exclude >
2424 </coverage >
2525 <testsuites >
2626 <testsuite name =" PhpArrayToXml Test Suite" >
27- <directory >./tests/</directory >
27+ <directory >./../ tests/</directory >
2828 </testsuite >
2929 </testsuites >
3030</phpunit >
You can’t perform that action at this time.
0 commit comments