diff --git a/composer.json b/composer.json index e6731e4..e2b28ef 100644 --- a/composer.json +++ b/composer.json @@ -32,6 +32,14 @@ "flight/Flight.php" ] }, + "autoload-dev": { + "classmap": [ + "tests/classes/User.php", + "tests/classes/Hello.php", + "tests/classes/Factory.php", + "tests/classes/TesterClass.php" + ] + }, "require-dev": { "ext-pdo_sqlite": "*", "phpunit/phpunit": "^9.5", diff --git a/tests/LoaderTest.php b/tests/LoaderTest.php index b4f7d4d..2ed2be9 100644 --- a/tests/LoaderTest.php +++ b/tests/LoaderTest.php @@ -8,12 +8,9 @@ */ use flight\core\Loader; +use PHPUnit\Framework\TestCase; -require_once __DIR__ . '/classes/User.php'; -require_once __DIR__ . '/classes/Factory.php'; -require_once __DIR__ . '/classes/TesterClass.php'; - -class LoaderTest extends PHPUnit\Framework\TestCase +class LoaderTest extends TestCase { private Loader $loader; diff --git a/tests/MapTest.php b/tests/MapTest.php index d147c94..dc75b56 100644 --- a/tests/MapTest.php +++ b/tests/MapTest.php @@ -8,10 +8,9 @@ */ use flight\Engine; +use PHPUnit\Framework\TestCase; -require_once __DIR__ . '/classes/Hello.php'; - -class MapTest extends PHPUnit\Framework\TestCase +class MapTest extends TestCase { private Engine $app; diff --git a/tests/RegisterTest.php b/tests/RegisterTest.php index f13629d..370b1ab 100644 --- a/tests/RegisterTest.php +++ b/tests/RegisterTest.php @@ -8,10 +8,9 @@ */ use flight\Engine; +use PHPUnit\Framework\TestCase; -require_once __DIR__ . '/classes/User.php'; - -class RegisterTest extends PHPUnit\Framework\TestCase +class RegisterTest extends TestCase { private Engine $app; diff --git a/tests/classes/TesterClass.php b/tests/classes/TesterClass.php index f3a6172..567ea37 100644 --- a/tests/classes/TesterClass.php +++ b/tests/classes/TesterClass.php @@ -8,6 +8,7 @@ class TesterClass public $param4; public $param5; public $param6; + public function __construct($param1, $param2, $param3, $param4, $param5, $param6) { $this->param1 = $param1; @@ -17,4 +18,4 @@ class TesterClass $this->param5 = $param5; $this->param6 = $param6; } -}; +}