mirror of
https://github.com/Karaka-Management/oms-Admin.git
synced 2026-01-11 21:38:40 +00:00
test fixes and added more tests
This commit is contained in:
parent
a1c31f8050
commit
7696ffe036
|
|
@ -81,7 +81,7 @@ echo $this->getData('nav')->render();
|
|||
<i class="tooltip" data-tooltip="<?= $this->getHtml('i:PasswordRegex'); ?>"><i class="fa fa-info-circle"></i></i>
|
||||
</label>
|
||||
|
||||
<input id="iPassword" name="settings_1000000001" type="text" value="<?= $this->printHtml($generalSettings['1000000001']['content']); ?>" placeholder=" ^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[$@$!%*?&;:\(\)\[\]=\{\}\+\-])[A-Za-z\d$@$!%*?&;:\(\)\[\]=\{\}\+\-]{8,}">
|
||||
<input id="iPassword" name="settings_1000000001" type="text" value="<?= $this->printHtml($generalSettings['1000000001']->content); ?>" placeholder=" ^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[$@$!%*?&;:\(\)\[\]=\{\}\+\-])[A-Za-z\d$@$!%*?&;:\(\)\[\]=\{\}\+\-]{8,}">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
|
|
@ -90,7 +90,7 @@ echo $this->getData('nav')->render();
|
|||
<i class="tooltip" data-tooltip="<?= $this->getHtml('i:LoginRetries'); ?>"><i class="fa fa-info-circle"></i></i>
|
||||
</label>
|
||||
|
||||
<input id="iLoginRetries" name="settings_1000000005" type="number" value="<?= $this->printHtml($generalSettings['1000000005']['content']); ?>" min="-1">
|
||||
<input id="iLoginRetries" name="settings_1000000005" type="number" value="<?= $this->printHtml($generalSettings['1000000005']->content); ?>" min="-1">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
|
|
@ -99,7 +99,7 @@ echo $this->getData('nav')->render();
|
|||
<i class="tooltip" data-tooltip="<?= $this->getHtml('i:TimeoutPeriod'); ?>"><i class="fa fa-info-circle"></i></i>
|
||||
</label>
|
||||
|
||||
<input id="iTimeoutPeriod" name="settings_1000000002" type="number" value="<?= $this->printHtml($generalSettings['1000000002']['content']); ?>">
|
||||
<input id="iTimeoutPeriod" name="settings_1000000002" type="number" value="<?= $this->printHtml($generalSettings['1000000002']->content); ?>">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
|
|
@ -108,7 +108,7 @@ echo $this->getData('nav')->render();
|
|||
<i class="tooltip" data-tooltip="<?= $this->getHtml('i:PasswordChangeInterval'); ?>"><i class="fa fa-info-circle"></i></i>
|
||||
</label>
|
||||
|
||||
<input id="iPasswordChangeInterval" name="settings_1000000003" type="number" value="<?= $this->printHtml($generalSettings['1000000003']['content']); ?>">
|
||||
<input id="iPasswordChangeInterval" name="settings_1000000003" type="number" value="<?= $this->printHtml($generalSettings['1000000003']->content); ?>">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
|
|
@ -117,7 +117,7 @@ echo $this->getData('nav')->render();
|
|||
<i class="tooltip" data-tooltip="<?= $this->getHtml('i:PasswordHistory'); ?>"><i class="fa fa-info-circle"></i></i>
|
||||
</label>
|
||||
|
||||
<input id="iPasswordHistory" name="settings_1000000004" type="number" value="<?= $this->printHtml($generalSettings['1000000004']['content']); ?>">
|
||||
<input id="iPasswordHistory" name="settings_1000000004" type="number" value="<?= $this->printHtml($generalSettings['1000000004']->content); ?>">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
@ -145,7 +145,7 @@ echo $this->getData('nav')->render();
|
|||
|
||||
<div class="form-group">
|
||||
<label for="iLogPath"><?= $this->getHtml('LogPath'); ?></label>
|
||||
<input id="iLogPath" name="settings_1000000007" type="text" value="<?= $this->printHtml($generalSettings['1000000007']['content']); ?>" placeholder=" /Logs">
|
||||
<input id="iLogPath" name="settings_1000000007" type="text" value="<?= $this->printHtml($generalSettings['1000000007']->content); ?>" placeholder=" /Logs">
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-foot">
|
||||
|
|
|
|||
|
|
@ -528,12 +528,13 @@ final class ApiController extends Controller
|
|||
|
||||
// handle Routes of already installed modules
|
||||
foreach ($installed as $module => $data) {
|
||||
$class = '\Modules\\' . $module . '\Admin\Installer';
|
||||
$class = '\Modules\\' . $module . '\Admin\Status';
|
||||
|
||||
$moduleInfo = new ModuleInfo(__DIR__ . '/../../../Modules/' . $module . '/info.json');
|
||||
$moduleInfo->load();
|
||||
|
||||
$class::reInit($moduleInfo, $appInfo);
|
||||
$class::activateRoutes($moduleInfo, $appInfo);
|
||||
$class::activateHooks($moduleInfo, $appInfo);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ $l11n = $this->getData('defaultlocalization') ?? new NullLocalization();
|
|||
<i class="tooltip" data-tooltip="<?= $this->getHtml('i:PasswordRegex'); ?>"><i class="fa fa-info-circle"></i></i>
|
||||
</label>
|
||||
|
||||
<input id="iPassword" name="settings_1000000001" type="text" value="<?= $this->printHtml($generalSettings['1000000001']['content']); ?>" placeholder=" ^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[$@$!%*?&;:\(\)\[\]=\{\}\+\-])[A-Za-z\d$@$!%*?&;:\(\)\[\]=\{\}\+\-]{8,}">
|
||||
<input id="iPassword" name="settings_1000000001" type="text" value="<?= $this->printHtml($generalSettings['1000000001']->content); ?>" placeholder=" ^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[$@$!%*?&;:\(\)\[\]=\{\}\+\-])[A-Za-z\d$@$!%*?&;:\(\)\[\]=\{\}\+\-]{8,}">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
|
|
@ -91,7 +91,7 @@ $l11n = $this->getData('defaultlocalization') ?? new NullLocalization();
|
|||
<i class="tooltip" data-tooltip="<?= $this->getHtml('i:LoginRetries'); ?>"><i class="fa fa-info-circle"></i></i>
|
||||
</label>
|
||||
|
||||
<input id="iLoginRetries" name="settings_1000000005" type="number" value="<?= $this->printHtml($generalSettings['1000000005']['content']); ?>" min="-1">
|
||||
<input id="iLoginRetries" name="settings_1000000005" type="number" value="<?= $this->printHtml($generalSettings['1000000005']->content); ?>" min="-1">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
|
|
@ -100,7 +100,7 @@ $l11n = $this->getData('defaultlocalization') ?? new NullLocalization();
|
|||
<i class="tooltip" data-tooltip="<?= $this->getHtml('i:TimeoutPeriod'); ?>"><i class="fa fa-info-circle"></i></i>
|
||||
</label>
|
||||
|
||||
<input id="iTimeoutPeriod" name="settings_1000000002" type="number" value="<?= $this->printHtml($generalSettings['1000000002']['content']); ?>">
|
||||
<input id="iTimeoutPeriod" name="settings_1000000002" type="number" value="<?= $this->printHtml($generalSettings['1000000002']->content); ?>">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
|
|
@ -109,7 +109,7 @@ $l11n = $this->getData('defaultlocalization') ?? new NullLocalization();
|
|||
<i class="tooltip" data-tooltip="<?= $this->getHtml('i:PasswordChangeInterval'); ?>"><i class="fa fa-info-circle"></i></i>
|
||||
</label>
|
||||
|
||||
<input id="iPasswordChangeInterval" name="settings_1000000003" type="number" value="<?= $this->printHtml($generalSettings['1000000003']['content']); ?>">
|
||||
<input id="iPasswordChangeInterval" name="settings_1000000003" type="number" value="<?= $this->printHtml($generalSettings['1000000003']->content); ?>">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
|
|
@ -118,7 +118,7 @@ $l11n = $this->getData('defaultlocalization') ?? new NullLocalization();
|
|||
<i class="tooltip" data-tooltip="<?= $this->getHtml('i:PasswordHistory'); ?>"><i class="fa fa-info-circle"></i></i>
|
||||
</label>
|
||||
|
||||
<input id="iPasswordHistory" name="settings_1000000004" type="number" value="<?= $this->printHtml($generalSettings['1000000004']['content']); ?>">
|
||||
<input id="iPasswordHistory" name="settings_1000000004" type="number" value="<?= $this->printHtml($generalSettings['1000000004']->content); ?>">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
@ -146,7 +146,7 @@ $l11n = $this->getData('defaultlocalization') ?? new NullLocalization();
|
|||
|
||||
<div class="form-group">
|
||||
<label for="iLogPath"><?= $this->getHtml('LogPath'); ?></label>
|
||||
<input id="iLogPath" name="settings_1000000007" type="text" value="<?= $this->printHtml($generalSettings['1000000007']['content']); ?>" placeholder=" /Logs">
|
||||
<input id="iLogPath" name="settings_1000000007" type="text" value="<?= $this->printHtml($generalSettings['1000000007']->content); ?>" placeholder=" /Logs">
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-foot">
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ trait ApiControllerSettingsTrait
|
|||
$request->setData('name', SettingsEnum::PASSWORD_INTERVAL);
|
||||
|
||||
$this->module->apiSettingsGet($request, $response);
|
||||
self::assertEquals('90', $response->get('')['response']['content']);
|
||||
self::assertEquals('90', $response->get('')['response']->content);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -55,7 +55,7 @@ trait ApiControllerSettingsTrait
|
|||
|
||||
$request->setData('name', SettingsEnum::PASSWORD_INTERVAL);
|
||||
$this->module->apiSettingsGet($request, $response);
|
||||
self::assertEquals('60', $response->get('')['response']['content']);
|
||||
self::assertEquals('60', $response->get('')['response']->content);
|
||||
|
||||
$request->setData('settings', \json_encode([['name' => SettingsEnum::PASSWORD_INTERVAL, 'content' => '90']]), true);
|
||||
$this->module->apiSettingsSet($request, $response);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user