diff options
| -rw-r--r-- | composer.json | 8 | ||||
| -rw-r--r-- | phpunit.xml.dist | 26 |
2 files changed, 34 insertions, 0 deletions
diff --git a/composer.json b/composer.json index 35df2b6..cf8469a 100644 --- a/composer.json +++ b/composer.json @@ -11,6 +11,11 @@ "Zhineng\\Region\\": "src/" } }, + "autoload-dev": { + "psr-4": { + "Zhineng\\Region\\Tests\\": "tests/" + } + }, "authors": [ { "name": "Li Zhineng", @@ -20,5 +25,8 @@ "require-dev": { "symfony/var-exporter": "^7.2", "phpunit/phpunit": "^12" + }, + "scripts": { + "test": "phpunit" } } diff --git a/phpunit.xml.dist b/phpunit.xml.dist new file mode 100644 index 0000000..9c414a4 --- /dev/null +++ b/phpunit.xml.dist @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?> +<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd" + bootstrap="vendor/autoload.php" + cacheDirectory=".phpunit.cache" + executionOrder="depends,defects" + requireCoverageMetadata="true" + beStrictAboutCoverageMetadata="true" + beStrictAboutOutputDuringTests="true" + displayDetailsOnPhpunitDeprecations="true" + failOnPhpunitDeprecation="true" + failOnRisky="true" + failOnWarning="true" + colors="true"> + <testsuites> + <testsuite name="default"> + <directory>tests</directory> + </testsuite> + </testsuites> + + <source ignoreIndirectDeprecations="true" restrictNotices="true" restrictWarnings="true"> + <include> + <directory>src</directory> + </include> + </source> +</phpunit> |
