mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-08 05:18:40 +00:00
fix test after settings pull out
This commit is contained in:
parent
0dd51a6f38
commit
6bc337e23a
|
|
@ -14,6 +14,7 @@ declare(strict_types=1);
|
||||||
|
|
||||||
namespace phpOMS\tests\Module;
|
namespace phpOMS\tests\Module;
|
||||||
|
|
||||||
|
use Model\CoreSettings;
|
||||||
use phpOMS\Application\ApplicationAbstract;
|
use phpOMS\Application\ApplicationAbstract;
|
||||||
use phpOMS\Dispatcher\Dispatcher;
|
use phpOMS\Dispatcher\Dispatcher;
|
||||||
use phpOMS\Message\Http\HttpRequest;
|
use phpOMS\Message\Http\HttpRequest;
|
||||||
|
|
@ -35,12 +36,13 @@ class ModuleManagerTest extends \PHPUnit\Framework\TestCase
|
||||||
|
|
||||||
protected function setUp() : void
|
protected function setUp() : void
|
||||||
{
|
{
|
||||||
$this->app = new class() extends ApplicationAbstract { protected string $appName = 'Api'; };
|
$this->app = new class() extends ApplicationAbstract { protected string $appName = 'Api'; };
|
||||||
$this->app->appName = 'Api';
|
$this->app->appName = 'Api';
|
||||||
$this->app->dbPool = $GLOBALS['dbpool'];
|
$this->app->dbPool = $GLOBALS['dbpool'];
|
||||||
$this->app->router = new WebRouter();
|
$this->app->router = new WebRouter();
|
||||||
$this->app->dispatcher = new Dispatcher($this->app);
|
$this->app->dispatcher = new Dispatcher($this->app);
|
||||||
$this->moduleManager = new ModuleManager($this->app, __DIR__ . '/../../../Modules');
|
$this->app->appSettings = new CoreSettings($this->app->dbPool->get('admin'));
|
||||||
|
$this->moduleManager = new ModuleManager($this->app, __DIR__ . '/../../../Modules');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user