diff options
| author | Li Zhineng <[email protected]> | 2025-04-28 17:34:14 +0800 |
|---|---|---|
| committer | Li Zhineng <[email protected]> | 2025-04-28 17:34:14 +0800 |
| commit | e1acfb0b977a38a8c465f3c6d5cc1aed49b79656 (patch) | |
| tree | ecff602ec3df27aab4420aeb5d8b029438f14c58 | |
| parent | fa936de142de9d003d15de9f846bf076d8fda805 (diff) | |
| download | region-china-e1acfb0b977a38a8c465f3c6d5cc1aed49b79656.tar.gz region-china-e1acfb0b977a38a8c465f3c6d5cc1aed49b79656.zip | |
setup PHPUnit
| -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> |
