diff --git a/.gitignore b/.gitignore index bb11804dda54fbdaa9fec3508c51dc0ff336f065..e25391c1f85364060ac958b37e8e35c6c51beafe 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,7 @@ phpunit.xml tools/ phpstan.neon + +.phpunit.result.cache + +phpunit.xml diff --git a/.phive/phars.xml b/.phive/phars.xml index f909b52075e43d32b8a361de9811b8ff1768b7c5..69848918f6a5c2730da83394e7237d2849997062 100644 --- a/.phive/phars.xml +++ b/.phive/phars.xml @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> <phive xmlns="https://phar.io/phive"> <phar name="phpstan" version="1.11.1" installed="1.11.1" location="./tools/phpstan" copy="false"/> + <phar name="phpunit" version="^10.5.20" installed="10.5.20" location="./tools/phpunit" copy="false"/> </phive> diff --git a/phpunit.dist.xml b/phpunit.dist.xml new file mode 100644 index 0000000000000000000000000000000000000000..f6c7becf0c12757beb871a9333e2d81e02aa7cae --- /dev/null +++ b/phpunit.dist.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<phpunit bootstrap="tests/phpunit-bootstrap.php"> + <testsuites> + <testsuite name="Tests"> + <directory>tests/</directory> + </testsuite> + </testsuites> +</phpunit> diff --git a/tests/phpunit-bootstrap.php b/tests/phpunit-bootstrap.php new file mode 100644 index 0000000000000000000000000000000000000000..eca92fd67bed8ae4ec424ed82d300119d792f042 --- /dev/null +++ b/tests/phpunit-bootstrap.php @@ -0,0 +1,11 @@ +<?php + +if (!defined('QUIQQER_SYSTEM')) { + define('QUIQQER_SYSTEM', true); +} + +if (!defined('QUIQQER_AJAX')) { + define('QUIQQER_AJAX', true); +} + +require_once __DIR__ . '/../../../../bootstrap.php';