mirror of
https://github.com/Karaka-Management/oms-Exchange.git
synced 2026-02-11 07:18:40 +00:00
fix tests
This commit is contained in:
parent
ea2cedf744
commit
b619bc4ccc
|
|
@ -14,9 +14,11 @@ declare(strict_types=1);
|
||||||
|
|
||||||
namespace Modules\Exchange\Interface;
|
namespace Modules\Exchange\Interface;
|
||||||
|
|
||||||
|
use Modules\Admin\Models\NullAccount;
|
||||||
use Modules\Exchange\Models\ExchangeLog;
|
use Modules\Exchange\Models\ExchangeLog;
|
||||||
use Modules\Exchange\Models\ExchangeType;
|
use Modules\Exchange\Models\ExchangeType;
|
||||||
use Modules\Exchange\Models\ExporterAbstract;
|
use Modules\Exchange\Models\ExporterAbstract;
|
||||||
|
use Modules\Exchange\Models\NullInterfaceManager;
|
||||||
use phpOMS\Message\RequestAbstract;
|
use phpOMS\Message\RequestAbstract;
|
||||||
use phpOMS\Message\ResponseAbstract;
|
use phpOMS\Message\ResponseAbstract;
|
||||||
use phpOMS\Utils\StringUtils;
|
use phpOMS\Utils\StringUtils;
|
||||||
|
|
@ -81,11 +83,11 @@ final class Exporter extends ExporterAbstract
|
||||||
$result = $this->exportLanguage();
|
$result = $this->exportLanguage();
|
||||||
|
|
||||||
$log = new ExchangeLog();
|
$log = new ExchangeLog();
|
||||||
$log->createdBy = $this->account;
|
$log->createdBy = new NullAccount($this->account);
|
||||||
$log->type = ExchangeType::EXPORT;
|
$log->type = ExchangeType::EXPORT;
|
||||||
$log->message = $this->l11n->getText($request->header->l11n->language, 'Exchange', '', 'LangFileExported');
|
$log->message = $this->l11n->getText($request->header->l11n->language, 'Exchange', '', 'LangFileExported');
|
||||||
$log->subtype = 'language';
|
$log->subtype = 'language';
|
||||||
$log->exchange = (int) $request->getData('id');
|
$log->exchange = new NullInterfaceManager((int) $request->getData('id'));
|
||||||
|
|
||||||
$result['logs'][] = $log;
|
$result['logs'][] = $log;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,9 +14,11 @@ declare(strict_types=1);
|
||||||
|
|
||||||
namespace Modules\Exchange\Interface;
|
namespace Modules\Exchange\Interface;
|
||||||
|
|
||||||
|
use Modules\Admin\Models\NullAccount;
|
||||||
use Modules\Exchange\Models\ExchangeLog;
|
use Modules\Exchange\Models\ExchangeLog;
|
||||||
use Modules\Exchange\Models\ExchangeType;
|
use Modules\Exchange\Models\ExchangeType;
|
||||||
use Modules\Exchange\Models\ImporterAbstract;
|
use Modules\Exchange\Models\ImporterAbstract;
|
||||||
|
use Modules\Exchange\Models\NullInterfaceManager;
|
||||||
use Modules\Media\Controller\ApiController;
|
use Modules\Media\Controller\ApiController;
|
||||||
use phpOMS\DataStorage\Database\Connection\ConnectionFactory;
|
use phpOMS\DataStorage\Database\Connection\ConnectionFactory;
|
||||||
use phpOMS\DataStorage\Database\DatabaseStatus;
|
use phpOMS\DataStorage\Database\DatabaseStatus;
|
||||||
|
|
@ -101,11 +103,11 @@ final class Importer extends ImporterAbstract
|
||||||
if ($request->getData('type') === 'language') {
|
if ($request->getData('type') === 'language') {
|
||||||
$this->importLanguage($request);
|
$this->importLanguage($request);
|
||||||
$log = new ExchangeLog();
|
$log = new ExchangeLog();
|
||||||
$log->createdBy = $this->account;
|
$log->createdBy = new NullAccount($this->account);
|
||||||
$log->type = ExchangeType::IMPORT;
|
$log->type = ExchangeType::IMPORT;
|
||||||
$log->message = $this->l11n->getText($request->header->l11n->language, 'Exchange', '', 'LangFileImported');
|
$log->message = $this->l11n->getText($request->header->l11n->language, 'Exchange', '', 'LangFileImported');
|
||||||
$log->subtype = 'language';
|
$log->subtype = 'language';
|
||||||
$log->exchange = (int) $request->getData('id');
|
$log->exchange = new NullInterfaceManager((int) $request->getData('id'));
|
||||||
|
|
||||||
$result['logs'][] = $log;
|
$result['logs'][] = $log;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user