From fdd6f50d4657aa7c56ed2aecceb7683f24609313 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Dufraisse?= Date: Sun, 19 Mar 2023 20:18:57 +0100 Subject: [PATCH] feat(Test/common): create --- composer.json | 1 + tests/AppTest.php | 10 ++++-- tests/Common.php | 91 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 100 insertions(+), 2 deletions(-) create mode 100644 tests/Common.php diff --git a/composer.json b/composer.json index 5c7ba8e..e6f98cd 100644 --- a/composer.json +++ b/composer.json @@ -36,6 +36,7 @@ "autoload": { "classmap": ["App.php","SeacmsAppPlugin.php"], "psr-4": { + "SeaCMS\\App\\Test\\": "tests", "SeaCMS\\App\\": "src" } }, diff --git a/tests/AppTest.php b/tests/AppTest.php index f207b99..4aa797d 100644 --- a/tests/AppTest.php +++ b/tests/AppTest.php @@ -8,12 +8,18 @@ namespace SeaCMS\App\Test; use SeaCMS\App; -use PHPUnit\Framework\TestCase; +use SeaCMS\App\Test\Common; -final class AppTest extends TestCase { +final class AppTest extends Common { public function testSuccess(): void { + $this->defineServer( + true, + 'index.php', + '/', + '' + ); $app = new App(''); $output = $app->runPico(); $this->assertTrue($app instanceof App); diff --git a/tests/Common.php b/tests/Common.php new file mode 100644 index 0000000..abf681d --- /dev/null +++ b/tests/Common.php @@ -0,0 +1,91 @@ +