From e1acfb0b977a38a8c465f3c6d5cc1aed49b79656 Mon Sep 17 00:00:00 2001 From: Li Zhineng Date: Mon, 28 Apr 2025 17:34:14 +0800 Subject: setup PHPUnit --- composer.json | 8 ++++++++ phpunit.xml.dist | 26 ++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 phpunit.xml.dist 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 @@ + + + + + tests + + + + + + src + + + -- cgit v1.2.3