mirror of
https://github.com/Karaka-Management/oms-QualityControl.git
synced 2026-02-09 02:18:40 +00:00
fix tests
This commit is contained in:
parent
6df67fb07f
commit
1d3fd8c2d7
33
Admin/Install/Navigation.install.json
Normal file
33
Admin/Install/Navigation.install.json
Normal file
|
|
@ -0,0 +1,33 @@
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"id": 1008601001,
|
||||||
|
"pid": "/",
|
||||||
|
"type": 2,
|
||||||
|
"subtype": 1,
|
||||||
|
"name": "QualityControl",
|
||||||
|
"uri": "{/base}/qualitymanagement/qualitycontrol/list",
|
||||||
|
"target": "self",
|
||||||
|
"icon": null,
|
||||||
|
"order": 65,
|
||||||
|
"from": "QualityControl",
|
||||||
|
"permission": { "permission": 2, "category": null, "element": null },
|
||||||
|
"parent": 1008501001,
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"id": 1008602001,
|
||||||
|
"pid": "/qualitymanagement/qualitycontrol",
|
||||||
|
"type": 3,
|
||||||
|
"subtype": 1,
|
||||||
|
"name": "List",
|
||||||
|
"uri": "{/base}/qualitymanagement/qualitycontrol/list",
|
||||||
|
"target": "self",
|
||||||
|
"icon": null,
|
||||||
|
"order": 1,
|
||||||
|
"from": "QualityControl",
|
||||||
|
"permission": { "permission": 2, "category": null, "element": null },
|
||||||
|
"parent": 1008601001,
|
||||||
|
"children": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
43
Admin/Install/Navigation.php
Normal file
43
Admin/Install/Navigation.php
Normal file
|
|
@ -0,0 +1,43 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Jingga
|
||||||
|
*
|
||||||
|
* PHP Version 8.1
|
||||||
|
*
|
||||||
|
* @package Modules\QualityControl\Admin\Install
|
||||||
|
* @copyright Dennis Eichhorn
|
||||||
|
* @license OMS License 2.0
|
||||||
|
* @version 1.0.0
|
||||||
|
* @link https://orange-management.org
|
||||||
|
*/
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Modules\QualityControl\Admin\Install;
|
||||||
|
|
||||||
|
use phpOMS\Application\ApplicationAbstract;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Navigation class.
|
||||||
|
*
|
||||||
|
* @package Modules\QualityControl\Admin\Install
|
||||||
|
* @license OMS License 2.0
|
||||||
|
* @link https://orange-management.org
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
class Navigation
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Install navigation providing
|
||||||
|
*
|
||||||
|
* @param ApplicationAbstract $app Application
|
||||||
|
* @param string $path Module path
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public static function install(ApplicationAbstract $app, string $path) : void
|
||||||
|
{
|
||||||
|
\Modules\Navigation\Admin\Installer::installExternal($app, ['path' => __DIR__ . '/Navigation.install.json']);
|
||||||
|
}
|
||||||
|
}
|
||||||
36
Admin/Installer.php
Normal file
36
Admin/Installer.php
Normal file
|
|
@ -0,0 +1,36 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Jingga
|
||||||
|
*
|
||||||
|
* PHP Version 8.1
|
||||||
|
*
|
||||||
|
* @package Modules\QualityControl\Admin
|
||||||
|
* @copyright Dennis Eichhorn
|
||||||
|
* @license OMS License 2.0
|
||||||
|
* @version 1.0.0
|
||||||
|
* @link https://orange-management.org
|
||||||
|
*/
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Modules\QualityControl\Admin;
|
||||||
|
|
||||||
|
use phpOMS\Module\InstallerAbstract;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Installer class.
|
||||||
|
*
|
||||||
|
* @package Modules\QualityControl\Admin
|
||||||
|
* @license OMS License 2.0
|
||||||
|
* @link https://orange-management.org
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
final class Installer extends InstallerAbstract
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Path of the file
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public const PATH = __DIR__;
|
||||||
|
}
|
||||||
3
Admin/Routes/Web/Backend.php
Normal file
3
Admin/Routes/Web/Backend.php
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
<?php declare(strict_types=1);
|
||||||
|
|
||||||
|
return [];
|
||||||
36
Admin/Status.php
Normal file
36
Admin/Status.php
Normal file
|
|
@ -0,0 +1,36 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Jingga
|
||||||
|
*
|
||||||
|
* PHP Version 8.1
|
||||||
|
*
|
||||||
|
* @package Modules\QualityControl\Admin
|
||||||
|
* @copyright Dennis Eichhorn
|
||||||
|
* @license OMS License 2.0
|
||||||
|
* @version 1.0.0
|
||||||
|
* @link https://orange-management.org
|
||||||
|
*/
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Modules\QualityControl\Admin;
|
||||||
|
|
||||||
|
use phpOMS\Module\StatusAbstract;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Status class.
|
||||||
|
*
|
||||||
|
* @package Modules\QualityControl\Admin
|
||||||
|
* @license OMS License 2.0
|
||||||
|
* @link https://orange-management.org
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
final class Status extends StatusAbstract
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Path of the file
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public const PATH = __DIR__;
|
||||||
|
}
|
||||||
36
Admin/Uninstaller.php
Normal file
36
Admin/Uninstaller.php
Normal file
|
|
@ -0,0 +1,36 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Jingga
|
||||||
|
*
|
||||||
|
* PHP Version 8.1
|
||||||
|
*
|
||||||
|
* @package Modules\QualityControl\Admin
|
||||||
|
* @copyright Dennis Eichhorn
|
||||||
|
* @license OMS License 2.0
|
||||||
|
* @version 1.0.0
|
||||||
|
* @link https://orange-management.org
|
||||||
|
*/
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Modules\QualityControl\Admin;
|
||||||
|
|
||||||
|
use phpOMS\Module\UninstallerAbstract;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Uninstaller class.
|
||||||
|
*
|
||||||
|
* @package Modules\QualityControl\Admin
|
||||||
|
* @license OMS License 2.0
|
||||||
|
* @link https://orange-management.org
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
final class Uninstaller extends UninstallerAbstract
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Path of the file
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public const PATH = __DIR__;
|
||||||
|
}
|
||||||
36
Admin/Updater.php
Normal file
36
Admin/Updater.php
Normal file
|
|
@ -0,0 +1,36 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Jingga
|
||||||
|
*
|
||||||
|
* PHP Version 8.1
|
||||||
|
*
|
||||||
|
* @package Modules\QualityControl\Admin
|
||||||
|
* @copyright Dennis Eichhorn
|
||||||
|
* @license OMS License 2.0
|
||||||
|
* @version 1.0.0
|
||||||
|
* @link https://orange-management.org
|
||||||
|
*/
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Modules\QualityControl\Admin;
|
||||||
|
|
||||||
|
use phpOMS\Module\UpdaterAbstract;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updater class.
|
||||||
|
*
|
||||||
|
* @package Modules\QualityControl\Admin
|
||||||
|
* @license OMS License 2.0
|
||||||
|
* @link https://orange-management.org
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
final class Updater extends UpdaterAbstract
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Path of the file
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public const PATH = __DIR__;
|
||||||
|
}
|
||||||
27
Controller/BackendController.php
Normal file
27
Controller/BackendController.php
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Jingga
|
||||||
|
*
|
||||||
|
* PHP Version 8.1
|
||||||
|
*
|
||||||
|
* @package Modules\QualityControl
|
||||||
|
* @copyright Dennis Eichhorn
|
||||||
|
* @license OMS License 2.0
|
||||||
|
* @version 1.0.0
|
||||||
|
* @link https://orange-management.org
|
||||||
|
*/
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Modules\QualityControl\Controller;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* QualityControl controller class.
|
||||||
|
*
|
||||||
|
* @package Modules\QualityControl
|
||||||
|
* @license OMS License 2.0
|
||||||
|
* @link https://orange-management.org
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
final class BackendController extends Controller
|
||||||
|
{
|
||||||
|
}
|
||||||
77
Controller/Controller.php
Normal file
77
Controller/Controller.php
Normal file
|
|
@ -0,0 +1,77 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Jingga
|
||||||
|
*
|
||||||
|
* PHP Version 8.1
|
||||||
|
*
|
||||||
|
* @package Modules\QualityControl
|
||||||
|
* @copyright Dennis Eichhorn
|
||||||
|
* @license OMS License 2.0
|
||||||
|
* @version 1.0.0
|
||||||
|
* @link https://orange-management.org
|
||||||
|
*/
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Modules\QualityControl\Controller;
|
||||||
|
|
||||||
|
use phpOMS\Module\ModuleAbstract;
|
||||||
|
use phpOMS\Module\WebInterface;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* QualityControl controller class.
|
||||||
|
*
|
||||||
|
* @package Modules\QualityControl
|
||||||
|
* @license OMS License 2.0
|
||||||
|
* @link https://orange-management.org
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
class Controller extends ModuleAbstract implements WebInterface
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Module path.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public const MODULE_PATH = __DIR__ . '/../';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Module version.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public const MODULE_VERSION = '1.0.0';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Module name.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public const MODULE_NAME = 'QualityControl';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Module id.
|
||||||
|
*
|
||||||
|
* @var int
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public const MODULE_ID = 1008600000;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Providing.
|
||||||
|
*
|
||||||
|
* @var string[]
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public static array $providing = [];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Dependencies.
|
||||||
|
*
|
||||||
|
* @var string[]
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public static array $dependencies = [];
|
||||||
|
}
|
||||||
47
info.json
Normal file
47
info.json
Normal file
|
|
@ -0,0 +1,47 @@
|
||||||
|
{
|
||||||
|
"name": {
|
||||||
|
"id": 1008600000,
|
||||||
|
"internal": "QualityControl",
|
||||||
|
"external": "QualityControl"
|
||||||
|
},
|
||||||
|
"category": "Tools",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"requirements": {
|
||||||
|
"phpOMS": "1.0.0",
|
||||||
|
"phpOMS-db": "1.0.0"
|
||||||
|
},
|
||||||
|
"creator": {
|
||||||
|
"name": "Jingga",
|
||||||
|
"website": "jingga.app"
|
||||||
|
},
|
||||||
|
"description": "The administration module.",
|
||||||
|
"directory": "QualityControl",
|
||||||
|
"dependencies": {
|
||||||
|
"Admin": "1.0.0",
|
||||||
|
"Tasks": "1.0.0",
|
||||||
|
"Tools": "1.0.0"
|
||||||
|
},
|
||||||
|
"providing": {
|
||||||
|
"Navigation": "*"
|
||||||
|
},
|
||||||
|
"load": [
|
||||||
|
{
|
||||||
|
"pid": [
|
||||||
|
"/qualitymanagement/qualitycontrol"
|
||||||
|
],
|
||||||
|
"type": 4,
|
||||||
|
"for": "Content",
|
||||||
|
"file": "QualityControl",
|
||||||
|
"from": "QualityControl"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pid": [
|
||||||
|
"/"
|
||||||
|
],
|
||||||
|
"type": 5,
|
||||||
|
"from": "QualityControl",
|
||||||
|
"for": "Navigation",
|
||||||
|
"file": "Navigation"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -21,7 +21,7 @@ final class AdminTest extends \PHPUnit\Framework\TestCase
|
||||||
{
|
{
|
||||||
protected const NAME = 'QualityControl';
|
protected const NAME = 'QualityControl';
|
||||||
|
|
||||||
protected const URI_LOAD = '';
|
protected const URI_LOAD = 'http://127.0.0.1/en/backend/qualitymanagement/qualitycontrol';
|
||||||
|
|
||||||
use \tests\Modules\ModuleTestTrait;
|
use \tests\Modules\ModuleTestTrait;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user