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 @@ +