fix test after settings pull out

This commit is contained in:
Dennis Eichhorn 2020-05-22 21:43:29 +02:00
parent 0dd51a6f38
commit 6bc337e23a

View File

@ -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');
}
/**