mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-11 09:48: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;
|
||||
|
||||
use Model\CoreSettings;
|
||||
use phpOMS\Application\ApplicationAbstract;
|
||||
use phpOMS\Dispatcher\Dispatcher;
|
||||
use phpOMS\Message\Http\HttpRequest;
|
||||
|
|
@ -35,12 +36,13 @@ class ModuleManagerTest extends \PHPUnit\Framework\TestCase
|
|||
|
||||
protected function setUp() : void
|
||||
{
|
||||
$this->app = new class() extends ApplicationAbstract { protected string $appName = 'Api'; };
|
||||
$this->app->appName = 'Api';
|
||||
$this->app->dbPool = $GLOBALS['dbpool'];
|
||||
$this->app->router = new WebRouter();
|
||||
$this->app->dispatcher = new Dispatcher($this->app);
|
||||
$this->moduleManager = new ModuleManager($this->app, __DIR__ . '/../../../Modules');
|
||||
$this->app = new class() extends ApplicationAbstract { protected string $appName = 'Api'; };
|
||||
$this->app->appName = 'Api';
|
||||
$this->app->dbPool = $GLOBALS['dbpool'];
|
||||
$this->app->router = new WebRouter();
|
||||
$this->app->dispatcher = new Dispatcher($this->app);
|
||||
$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