add phpunit
This commit is contained in:
40
Tests/phpunit.xml
Normal file
40
Tests/phpunit.xml
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
backupGlobals="true"
|
||||||
|
bootstrap="../../../../source/bootstrap.php"
|
||||||
|
colors="true"
|
||||||
|
backupStaticAttributes="false"
|
||||||
|
convertErrorsToExceptions="true"
|
||||||
|
convertNoticesToExceptions="false"
|
||||||
|
convertWarningsToExceptions="false"
|
||||||
|
forceCoversAnnotation="false"
|
||||||
|
processIsolation="false"
|
||||||
|
stopOnError="false"
|
||||||
|
stopOnFailure="false"
|
||||||
|
stopOnIncomplete="false"
|
||||||
|
stopOnSkipped="false"
|
||||||
|
beStrictAboutTestsThatDoNotTestAnything="false"
|
||||||
|
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.6/phpunit.xsd">
|
||||||
|
<testsuites>
|
||||||
|
<testsuite name="Unit">
|
||||||
|
<directory>Unit/</directory>
|
||||||
|
</testsuite>
|
||||||
|
<!-- <testsuite name="Integration">-->
|
||||||
|
<!-- <directory>integration/</directory>-->
|
||||||
|
<!-- </testsuite>-->
|
||||||
|
</testsuites>
|
||||||
|
<coverage includeUncoveredFiles="true" processUncoveredFiles="true">
|
||||||
|
<include>
|
||||||
|
<directory suffix=".php">../</directory>
|
||||||
|
</include>
|
||||||
|
<exclude>
|
||||||
|
<file>../.php-cs-fixer.php</file>
|
||||||
|
<file>../IntelliSenseHelper.php</file>
|
||||||
|
<file>../rector.php</file>
|
||||||
|
<directory>../Tests/</directory>
|
||||||
|
</exclude>
|
||||||
|
</coverage>
|
||||||
|
<php>
|
||||||
|
<const name="OXID_PHP_UNIT" value="true"/>
|
||||||
|
</php>
|
||||||
|
</phpunit>
|
@ -34,6 +34,8 @@
|
|||||||
"symfony/string": "^6"
|
"symfony/string": "^6"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
|
"phpunit/phpunit" : "^9.6",
|
||||||
|
"d3/testingtools": "^1.3.0.0",
|
||||||
"friendsofphp/php-cs-fixer": "^3.9",
|
"friendsofphp/php-cs-fixer": "^3.9",
|
||||||
"boxblinkracer/phpunuhi": "^1.12"
|
"boxblinkracer/phpunuhi": "^1.12"
|
||||||
},
|
},
|
||||||
@ -45,6 +47,10 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"php-cs-fixer": "./vendor/bin/php-cs-fixer fix --config=vendor/d3/pdfdocuments/.php-cs-fixer.php",
|
"php-cs-fixer": "./vendor/bin/php-cs-fixer fix --config=vendor/d3/pdfdocuments/.php-cs-fixer.php",
|
||||||
|
|
||||||
|
"phpunit": "XDEBUG_MODE=off ./vendor/bin/phpunit --config=vendor/d3/pdfdocuments/Tests/",
|
||||||
|
"phpunit-line-coverage": "XDEBUG_MODE=coverage ./vendor/bin/phpunit --config=vendor/d3/pdfdocuments/Tests/ --coverage-html=vendor/d3/pdfdocuments/Tests/result/coverage",
|
||||||
|
"phpunit-path-coverage": "XDEBUG_MODE=coverage ./vendor/bin/phpunit --config=vendor/d3/pdfdocuments/Tests/ --coverage-html=vendor/d3/pdfdocuments/Tests/result/coverage --path-coverage",
|
||||||
|
|
||||||
"phpunuhi-validate": "./vendor/bin/phpunuhi validate --configuration=vendor/d3/pdfdocuments/phpunuhi.xml",
|
"phpunuhi-validate": "./vendor/bin/phpunuhi validate --configuration=vendor/d3/pdfdocuments/phpunuhi.xml",
|
||||||
"phpunuhi-tplcheck": "./vendor/bin/phpunuhi scan:usage --dir=vendor/d3/pdfdocuments/views/twig/admin --scanner=twig --set=Backend --configuration=vendor/d3/pdfdocuments/phpunuhi.xml"
|
"phpunuhi-tplcheck": "./vendor/bin/phpunuhi scan:usage --dir=vendor/d3/pdfdocuments/views/twig/admin --scanner=twig --set=Backend --configuration=vendor/d3/pdfdocuments/phpunuhi.xml"
|
||||||
"phpunuhi-status": "./vendor/bin/phpunuhi status --configuration=vendor/d3/pdfdocuments/phpunuhi.xml"
|
"phpunuhi-status": "./vendor/bin/phpunuhi status --configuration=vendor/d3/pdfdocuments/phpunuhi.xml"
|
||||||
|
Reference in New Issue
Block a user