From c98dc0a198ee0cf27a1627e0ca42ec96d6760d42 Mon Sep 17 00:00:00 2001 From: Jens Date: Sun, 7 Jun 2026 22:14:33 +0200 Subject: [PATCH] phpunit --- .env | 3 +++ .gitignore | 6 +++++- bin/phpunit | 4 ++++ composer.json | 1 + phpunit.dist.xml | 42 ++++++++++++++++++++++++++++++++++++++++++ tests/bootstrap.php | 13 +++++++++++++ 6 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 .env create mode 100755 bin/phpunit create mode 100644 phpunit.dist.xml create mode 100644 tests/bootstrap.php diff --git a/.env b/.env new file mode 100644 index 0000000..64bd111 --- /dev/null +++ b/.env @@ -0,0 +1,3 @@ +# define your env variables for the test env here +KERNEL_CLASS='App\Kernel' +APP_SECRET='$ecretf0rt3st' diff --git a/.gitignore b/.gitignore index 8d26d7a..5b0531b 100644 --- a/.gitignore +++ b/.gitignore @@ -130,4 +130,8 @@ composer.phar.md5sum /phpunit_coverage.xml # Symfony binary -/bin/symfony \ No newline at end of file +/bin/symfony +###> phpunit/phpunit ### +/phpunit.xml +/.phpunit.cache/ +###< phpunit/phpunit ### diff --git a/bin/phpunit b/bin/phpunit new file mode 100755 index 0000000..ac5eef1 --- /dev/null +++ b/bin/phpunit @@ -0,0 +1,4 @@ +#!/usr/bin/env php + + + + + + + + + + + + + + tests + + + + + + src + + + + trigger_deprecation + + + + + + diff --git a/tests/bootstrap.php b/tests/bootstrap.php new file mode 100644 index 0000000..47a5855 --- /dev/null +++ b/tests/bootstrap.php @@ -0,0 +1,13 @@ +bootEnv(dirname(__DIR__).'/.env'); +} + +if ($_SERVER['APP_DEBUG']) { + umask(0000); +}