| = $value->id; ?>
- | = $value->getType(); ?>
+ | = $value->type; ?>
| = $value->subtype; ?>
| = $value->exchange->title; ?>
| = $value->createdBy->name1; ?>
diff --git a/Theme/Backend/exchange-log.tpl.php b/Theme/Backend/exchange-log.tpl.php
index 5bca94f..3d31814 100755
--- a/Theme/Backend/exchange-log.tpl.php
+++ b/Theme/Backend/exchange-log.tpl.php
@@ -27,10 +27,10 @@ echo $this->data['nav']->render();
| = $this->getHtml('ID', '0', '0'); ?> | = $log->id; ?>
- | | = $this->getHtml('Type'); ?> | = $log->getType(); ?>
+ | | = $this->getHtml('Type'); ?> | = $log->type; ?>
| | = $this->getHtml('Subtype'); ?> | = $log->subtype; ?>
| | = $this->getHtml('Created'); ?> | = $log->createdAt->format('Y-m-d'); ?>
- | | = $this->getHtml('Creator'); ?> | = $log->createdBy->name1; ?>
+ | | = $this->getHtml('Creator'); ?> | = $log->createdBy->name1; ?>
| | = $log->message; ?>
|
diff --git a/tests/Autoloader.php b/tests/Autoloader.php
index 32f17c1..fe2e06a 100755
--- a/tests/Autoloader.php
+++ b/tests/Autoloader.php
@@ -75,8 +75,8 @@ final class Autoloader
*/
public static function defaultAutoloader(string $class) : void
{
- $class = \ltrim($class, '\\');
- $class = \strtr($class, '_\\', '//');
+ $class = \ltrim($class, '\\');
+ $class = \strtr($class, '_\\', '//');
if (\stripos($class, 'Web/Backend') !== false || \stripos($class, 'Web/Api') !== false) {
$class = \is_dir(__DIR__ . '/Web') ? $class : \str_replace('Web/', 'MainRepository/Web/', $class);
diff --git a/tests/Bootstrap.php b/tests/Bootstrap.php
index ddc049d..5e3edd4 100755
--- a/tests/Bootstrap.php
+++ b/tests/Bootstrap.php
@@ -1,4 +1,15 @@
[
+ 'db' => [
'core' => [
'masters' => [
- 'admin' => [
+ 'admin' => [
'db' => 'mysql', /* db type */
'host' => '127.0.0.1', /* db host address */
'port' => '3306', /* db host port */
@@ -80,7 +91,7 @@ $CONFIG = [
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s',
],
- 'insert' => [
+ 'insert' => [
'db' => 'mysql', /* db type */
'host' => '127.0.0.1', /* db host address */
'port' => '3306', /* db host port */
@@ -90,7 +101,7 @@ $CONFIG = [
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s',
],
- 'select' => [
+ 'select' => [
'db' => 'mysql', /* db type */
'host' => '127.0.0.1', /* db host address */
'port' => '3306', /* db host port */
@@ -100,7 +111,7 @@ $CONFIG = [
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s',
],
- 'update' => [
+ 'update' => [
'db' => 'mysql', /* db type */
'host' => '127.0.0.1', /* db host address */
'port' => '3306', /* db host port */
@@ -110,7 +121,7 @@ $CONFIG = [
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s',
],
- 'delete' => [
+ 'delete' => [
'db' => 'mysql', /* db type */
'host' => '127.0.0.1', /* db host address */
'port' => '3306', /* db host port */
@@ -120,7 +131,7 @@ $CONFIG = [
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s',
],
- 'schema' => [
+ 'schema' => [
'db' => 'mysql', /* db type */
'host' => '127.0.0.1', /* db host address */
'port' => '3306', /* db host port */
@@ -132,7 +143,7 @@ $CONFIG = [
],
],
'postgresql' => [
- 'admin' => [
+ 'admin' => [
'db' => 'pgsql', /* db type */
'host' => '127.0.0.1', /* db host address */
'port' => '5432', /* db host port */
@@ -142,7 +153,7 @@ $CONFIG = [
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s',
],
- 'insert' => [
+ 'insert' => [
'db' => 'pgsql', /* db type */
'host' => '127.0.0.1', /* db host address */
'port' => '5432', /* db host port */
@@ -152,7 +163,7 @@ $CONFIG = [
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s',
],
- 'select' => [
+ 'select' => [
'db' => 'pgsql', /* db type */
'host' => '127.0.0.1', /* db host address */
'port' => '5432', /* db host port */
@@ -162,7 +173,7 @@ $CONFIG = [
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s',
],
- 'update' => [
+ 'update' => [
'db' => 'pgsql', /* db type */
'host' => '127.0.0.1', /* db host address */
'port' => '5432', /* db host port */
@@ -172,7 +183,7 @@ $CONFIG = [
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s',
],
- 'delete' => [
+ 'delete' => [
'db' => 'pgsql', /* db type */
'host' => '127.0.0.1', /* db host address */
'port' => '5432', /* db host port */
@@ -182,7 +193,7 @@ $CONFIG = [
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s',
],
- 'schema' => [
+ 'schema' => [
'db' => 'pgsql', /* db type */
'host' => '127.0.0.1', /* db host address */
'port' => '5432', /* db host port */
@@ -194,37 +205,37 @@ $CONFIG = [
],
],
'sqlite' => [
- 'admin' => [
+ 'admin' => [
'db' => 'sqlite', /* db type */
'database' => __DIR__ . '/../Karaka/phpOMS/Localization/Defaults/localization.sqlite', /* db name */
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s',
],
- 'insert' => [
+ 'insert' => [
'db' => 'sqlite', /* db type */
'database' => __DIR__ . '/../Karaka/phpOMS/Localization/Defaults/localization.sqlite', /* db name */
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s',
],
- 'select' => [
+ 'select' => [
'db' => 'sqlite', /* db type */
'database' => __DIR__ . '/../Karaka/phpOMS/Localization/Defaults/localization.sqlite', /* db name */
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s',
],
- 'update' => [
+ 'update' => [
'db' => 'sqlite', /* db type */
'database' => __DIR__ . '/../Karaka/phpOMS/Localization/Defaults/localization.sqlite', /* db name */
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s',
],
- 'delete' => [
+ 'delete' => [
'db' => 'sqlite', /* db type */
'database' => __DIR__ . '/../Karaka/phpOMS/Localization/Defaults/localization.sqlite', /* db name */
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s',
],
- 'schema' => [
+ 'schema' => [
'db' => 'sqlite', /* db type */
'database' => __DIR__ . '/../Karaka/phpOMS/Localization/Defaults/localization.sqlite', /* db name */
'weight' => 1000, /* db table prefix */
@@ -232,7 +243,7 @@ $CONFIG = [
],
],
'mssql' => [
- 'admin' => [
+ 'admin' => [
'db' => 'mssql', /* db type */
'host' => '127.0.0.1', /* db host address */
'port' => '1433', /* db host port */
@@ -242,7 +253,7 @@ $CONFIG = [
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s',
],
- 'insert' => [
+ 'insert' => [
'db' => 'mssql', /* db type */
'host' => '127.0.0.1', /* db host address */
'port' => '1433', /* db host port */
@@ -252,7 +263,7 @@ $CONFIG = [
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s',
],
- 'select' => [
+ 'select' => [
'db' => 'mssql', /* db type */
'host' => '127.0.0.1', /* db host address */
'port' => '1433', /* db host port */
@@ -262,7 +273,7 @@ $CONFIG = [
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s',
],
- 'update' => [
+ 'update' => [
'db' => 'mssql', /* db type */
'host' => '127.0.0.1', /* db host address */
'port' => '1433', /* db host port */
@@ -272,7 +283,7 @@ $CONFIG = [
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s',
],
- 'delete' => [
+ 'delete' => [
'db' => 'mssql', /* db type */
'host' => '127.0.0.1', /* db host address */
'port' => '1433', /* db host port */
@@ -282,7 +293,7 @@ $CONFIG = [
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s',
],
- 'schema' => [
+ 'schema' => [
'db' => 'mssql', /* db type */
'host' => '127.0.0.1', /* db host address */
'port' => '1433', /* db host port */
@@ -322,16 +333,16 @@ $CONFIG = [
'password' => '123456',
],
],
- 'log' => [
+ 'log' => [
'file' => [
'path' => __DIR__ . '/Logs',
],
],
- 'page' => [
+ 'page' => [
'root' => '/',
'https' => false,
],
- 'app' => [
+ 'app' => [
'path' => __DIR__,
'default' => [
'app' => 'Backend',
@@ -350,7 +361,7 @@ $CONFIG = [
],
],
],
- 'socket' => [
+ 'socket' => [
'master' => [
'host' => '127.0.0.1',
'limit' => 300,
@@ -360,7 +371,7 @@ $CONFIG = [
'language' => [
'en',
],
- 'apis' => [
+ 'apis' => [
],
];
diff --git a/tests/Controller/ApiControllerTest.php b/tests/Controller/ApiControllerTest.php
index 23eae7f..6f4ca8b 100755
--- a/tests/Controller/ApiControllerTest.php
+++ b/tests/Controller/ApiControllerTest.php
@@ -31,7 +31,6 @@ use phpOMS\Module\ModuleAbstract;
use phpOMS\Module\ModuleManager;
use phpOMS\Router\WebRouter;
use phpOMS\System\File\Local\Directory;
-use phpOMS\Uri\HttpUri;
use phpOMS\Utils\TestUtils;
/**
@@ -58,13 +57,13 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase
protected string $appName = 'Api';
};
- $this->app->dbPool = $GLOBALS['dbpool'];
- $this->app->unitId = 1;
- $this->app->accountManager = new AccountManager($GLOBALS['session']);
- $this->app->appSettings = new CoreSettings();
- $this->app->moduleManager = new ModuleManager($this->app, __DIR__ . '/../../../../Modules/');
- $this->app->dispatcher = new Dispatcher($this->app);
- $this->app->eventManager = new EventManager($this->app->dispatcher);
+ $this->app->dbPool = $GLOBALS['dbpool'];
+ $this->app->unitId = 1;
+ $this->app->accountManager = new AccountManager($GLOBALS['session']);
+ $this->app->appSettings = new CoreSettings();
+ $this->app->moduleManager = new ModuleManager($this->app, __DIR__ . '/../../../../Modules/');
+ $this->app->dispatcher = new Dispatcher($this->app);
+ $this->app->eventManager = new EventManager($this->app->dispatcher);
$this->app->eventManager->importFromFile(__DIR__ . '/../../../../Web/Api/Hooks.php');
$this->app->sessionManager = new HttpSession(36000);
$this->app->l11nManager = new L11nManager();
@@ -113,7 +112,7 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase
$data = \json_decode(\file_get_contents(__DIR__ . '/../Interfaces/' . $exchange . '/interface.json'), true);
$response = new HttpResponse();
- $request = new HttpRequest(new HttpUri(''));
+ $request = new HttpRequest();
$request->header->account = 1;
$request->setData('title', $data['name']);
@@ -184,7 +183,7 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase
public function testInterfaceInstallInvalidData() : void
{
$response = new HttpResponse();
- $request = new HttpRequest(new HttpUri(''));
+ $request = new HttpRequest();
$request->header->account = 1;
$request->setData('invalid', '1');
@@ -200,7 +199,7 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase
public function testExport() : void
{
$response = new HttpResponse();
- $request = new HttpRequest(new HttpUri(''));
+ $request = new HttpRequest();
$request->header->account = 1;
$request->setData('id', '1');
@@ -217,7 +216,7 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase
public function testExportInvalidInterface() : void
{
$response = new HttpResponse();
- $request = new HttpRequest(new HttpUri(''));
+ $request = new HttpRequest();
$request->header->account = 1;
$request->setData('id', '9999');
@@ -234,7 +233,7 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase
public function testLanguageImport() : void
{
$response = new HttpResponse();
- $request = new HttpRequest(new HttpUri(''));
+ $request = new HttpRequest();
$request->header->account = 1;
$request->setData('id', '1');
@@ -268,7 +267,7 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase
public function testImportInvalidInterface() : void
{
$response = new HttpResponse();
- $request = new HttpRequest(new HttpUri(''));
+ $request = new HttpRequest();
$request->header->account = 1;
$request->setData('id', '9999');
@@ -280,7 +279,7 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase
public function testInvalidapiExchangeSettingCreate() : void
{
$response = new HttpResponse();
- $request = new HttpRequest(new HttpUri(''));
+ $request = new HttpRequest();
$request->header->account = 1;
$this->module->apiExchangeSettingCreate($request, $response);
diff --git a/tests/Interfaces/OMS/Exporter.php b/tests/Interfaces/OMS/Exporter.php
index 6f8e91d..ea62b2e 100755
--- a/tests/Interfaces/OMS/Exporter.php
+++ b/tests/Interfaces/OMS/Exporter.php
@@ -81,10 +81,10 @@ final class Exporter extends ExporterAbstract
$log = new ExchangeLog();
$log->createdBy = $this->account;
- $log->setType(ExchangeType::EXPORT);
- $log->message = $this->l11n->getText($request->header->l11n->language, 'Exchange', '', 'LangFileExported');
- $log->subtype = 'language';
- $log->exchange = (int) $request->getData('id');
+ $log->type = ExchangeType::EXPORT;
+ $log->message = $this->l11n->getText($request->header->l11n->language, 'Exchange', '', 'LangFileExported');
+ $log->subtype = 'language';
+ $log->exchange = (int) $request->getData('id');
$result['logs'][] = $log;
}
diff --git a/tests/Interfaces/OMS/Importer.php b/tests/Interfaces/OMS/Importer.php
index e2758fd..d98e676 100755
--- a/tests/Interfaces/OMS/Importer.php
+++ b/tests/Interfaces/OMS/Importer.php
@@ -101,10 +101,10 @@ final class Importer extends ImporterAbstract
$this->importLanguage($request);
$log = new ExchangeLog();
$log->createdBy = $this->account;
- $log->setType(ExchangeType::IMPORT);
- $log->message = $this->l11n->getText($request->header->l11n->language, 'Exchange', '', 'LangFileImported');
- $log->subtype = 'language';
- $log->exchange = (int) $request->getData('id');
+ $log->type = ExchangeType::IMPORT;
+ $log->message = $this->l11n->getText($request->header->l11n->language, 'Exchange', '', 'LangFileImported');
+ $log->subtype = 'language';
+ $log->exchange = (int) $request->getData('id');
$result['logs'][] = $log;
}
diff --git a/tests/Interfaces/OMS/Lang/en.lang.php b/tests/Interfaces/OMS/Lang/en.lang.php
index 64e0110..559eae1 100755
--- a/tests/Interfaces/OMS/Lang/en.lang.php
+++ b/tests/Interfaces/OMS/Lang/en.lang.php
@@ -13,7 +13,7 @@ declare(strict_types=1);
* @link https://jingga.app
*/
return [
- 'Language' => 'Language',
- 'LangFileExported' => 'Language file got exported',
- 'LangFileImported' => 'Language file got imported',
+ 'Language' => 'Language',
+ 'LangFileExported' => 'Language file got exported',
+ 'LangFileImported' => 'Language file got imported',
];
diff --git a/tests/Interfaces/OMS/export.tpl.php b/tests/Interfaces/OMS/export.tpl.php
index a7799cf..a7f0af0 100755
--- a/tests/Interfaces/OMS/export.tpl.php
+++ b/tests/Interfaces/OMS/export.tpl.php
@@ -17,7 +17,7 @@ $lang = $this->getData('lang');
|