fix tests

This commit is contained in:
Dennis Eichhorn 2023-09-25 15:14:06 +00:00
parent e351795d25
commit 0a72fbce01
11 changed files with 359 additions and 1 deletions

View File

@ -0,0 +1,17 @@
[
{
"id": 1008501001,
"pid": "/",
"type": 2,
"subtype": 0,
"name": "QualityManagement",
"uri": null,
"target": "self",
"icon": "fa fa-exclamation-triangle",
"order": 100,
"from": "QualityManagement",
"permission": { "permission": 2, "type": null, "element": null },
"parent": 0,
"children": []
}
]

View File

@ -0,0 +1,43 @@
<?php
/**
* Jingga
*
* PHP Version 8.1
*
* @package Modules\QualityManagement\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\QualityManagement\Admin\Install;
use phpOMS\Application\ApplicationAbstract;
/**
* Navigation class.
*
* @package Modules\QualityManagement\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
View File

@ -0,0 +1,36 @@
<?php
/**
* Jingga
*
* PHP Version 8.1
*
* @package Modules\QualityManagement\Admin
* @copyright Dennis Eichhorn
* @license OMS License 2.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
namespace Modules\QualityManagement\Admin;
use phpOMS\Module\InstallerAbstract;
/**
* Installer class.
*
* @package Modules\QualityManagement\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__;
}

View File

@ -0,0 +1,3 @@
<?php declare(strict_types=1);
return [];

36
Admin/Status.php Normal file
View File

@ -0,0 +1,36 @@
<?php
/**
* Jingga
*
* PHP Version 8.1
*
* @package Modules\QualityManagement\Admin
* @copyright Dennis Eichhorn
* @license OMS License 2.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
namespace Modules\QualityManagement\Admin;
use phpOMS\Module\StatusAbstract;
/**
* Status class.
*
* @package Modules\QualityManagement\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
View File

@ -0,0 +1,36 @@
<?php
/**
* Jingga
*
* PHP Version 8.1
*
* @package Modules\QualityManagement\Admin
* @copyright Dennis Eichhorn
* @license OMS License 2.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
namespace Modules\QualityManagement\Admin;
use phpOMS\Module\UninstallerAbstract;
/**
* Uninstaller class.
*
* @package Modules\QualityManagement\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
View File

@ -0,0 +1,36 @@
<?php
/**
* Jingga
*
* PHP Version 8.1
*
* @package Modules\QualityManagement\Admin
* @copyright Dennis Eichhorn
* @license OMS License 2.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
namespace Modules\QualityManagement\Admin;
use phpOMS\Module\UpdaterAbstract;
/**
* Updater class.
*
* @package Modules\QualityManagement\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__;
}

View File

@ -0,0 +1,27 @@
<?php
/**
* Jingga
*
* PHP Version 8.1
*
* @package Modules\QualityManagement
* @copyright Dennis Eichhorn
* @license OMS License 2.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
namespace Modules\QualityManagement\Controller;
/**
* QualityManagement controller class.
*
* @package Modules\QualityManagement
* @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
View File

@ -0,0 +1,77 @@
<?php
/**
* Jingga
*
* PHP Version 8.1
*
* @package Modules\QualityManagement
* @copyright Dennis Eichhorn
* @license OMS License 2.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
namespace Modules\QualityManagement\Controller;
use phpOMS\Module\ModuleAbstract;
use phpOMS\Module\WebInterface;
/**
* QualityManagement controller class.
*
* @package Modules\QualityManagement
* @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 = 'QualityManagement';
/**
* Module id.
*
* @var int
* @since 1.0.0
*/
public const MODULE_ID = 1008500000;
/**
* 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
View File

@ -0,0 +1,47 @@
{
"name": {
"id": 1008500000,
"internal": "QualityManagement",
"external": "QualityManagement"
},
"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": "QualityManagement",
"dependencies": {
"Admin": "1.0.0",
"Tasks": "1.0.0",
"Tools": "1.0.0"
},
"providing": {
"Navigation": "*"
},
"load": [
{
"pid": [
"/qualitymanagement"
],
"type": 4,
"for": "Content",
"file": "QualityManagement",
"from": "QualityManagement"
},
{
"pid": [
"/"
],
"type": 5,
"from": "QualityManagement",
"for": "Navigation",
"file": "Navigation"
}
]
}

View File

@ -19,7 +19,7 @@ namespace Modules\QualityManagement\tests\Admin;
*/
final class AdminTest extends \PHPUnit\Framework\TestCase
{
protected const NAME = 'QualityManagement';
protected const NAME = 'http://127.0.0.1/en/backend/qualitymanagement';
protected const URI_LOAD = '';