Added development classmap autoloader

pull/531/head
fadrian06 1 year ago
parent eadca18a5a
commit bdca41d7e1

@ -32,6 +32,14 @@
"flight/Flight.php" "flight/Flight.php"
] ]
}, },
"autoload-dev": {
"classmap": [
"tests/classes/User.php",
"tests/classes/Hello.php",
"tests/classes/Factory.php",
"tests/classes/TesterClass.php"
]
},
"require-dev": { "require-dev": {
"ext-pdo_sqlite": "*", "ext-pdo_sqlite": "*",
"phpunit/phpunit": "^9.5", "phpunit/phpunit": "^9.5",

@ -8,12 +8,9 @@
*/ */
use flight\core\Loader; use flight\core\Loader;
use PHPUnit\Framework\TestCase;
require_once __DIR__ . '/classes/User.php'; class LoaderTest extends TestCase
require_once __DIR__ . '/classes/Factory.php';
require_once __DIR__ . '/classes/TesterClass.php';
class LoaderTest extends PHPUnit\Framework\TestCase
{ {
private Loader $loader; private Loader $loader;

@ -8,10 +8,9 @@
*/ */
use flight\Engine; use flight\Engine;
use PHPUnit\Framework\TestCase;
require_once __DIR__ . '/classes/Hello.php'; class MapTest extends TestCase
class MapTest extends PHPUnit\Framework\TestCase
{ {
private Engine $app; private Engine $app;

@ -8,10 +8,9 @@
*/ */
use flight\Engine; use flight\Engine;
use PHPUnit\Framework\TestCase;
require_once __DIR__ . '/classes/User.php'; class RegisterTest extends TestCase
class RegisterTest extends PHPUnit\Framework\TestCase
{ {
private Engine $app; private Engine $app;

@ -8,6 +8,7 @@ class TesterClass
public $param4; public $param4;
public $param5; public $param5;
public $param6; public $param6;
public function __construct($param1, $param2, $param3, $param4, $param5, $param6) public function __construct($param1, $param2, $param3, $param4, $param5, $param6)
{ {
$this->param1 = $param1; $this->param1 = $param1;
@ -17,4 +18,4 @@ class TesterClass
$this->param5 = $param5; $this->param5 = $param5;
$this->param6 = $param6; $this->param6 = $param6;
} }
}; }

Loading…
Cancel
Save