fix tests

This commit is contained in:
Dennis Eichhorn 2023-09-25 15:14:06 +00:00
parent 2e473a22cb
commit 8fd41fcec6
11 changed files with 375 additions and 1 deletions

View File

@ -0,0 +1,33 @@
[
{
"id": 1008701001,
"pid": "/",
"type": 2,
"subtype": 1,
"name": "QualityAssurance",
"uri": "{/base}/qualitymanagement/qualityassurance/list",
"target": "self",
"icon": null,
"order": 65,
"from": "QualityAssurance",
"permission": { "permission": 2, "category": null, "element": null },
"parent": 1008501001,
"children": [
{
"id": 1008702001,
"pid": "/qualitymanagement/qualityassurance",
"type": 3,
"subtype": 1,
"name": "List",
"uri": "{/base}/qualitymanagement/qualityassurance/list",
"target": "self",
"icon": null,
"order": 1,
"from": "QualityAssurance",
"permission": { "permission": 2, "category": null, "element": null },
"parent": 1008701001,
"children": []
}
]
}
]

View File

@ -0,0 +1,43 @@
<?php
/**
* Jingga
*
* PHP Version 8.1
*
* @package Modules\QualityAssurance\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\QualityAssurance\Admin\Install;
use phpOMS\Application\ApplicationAbstract;
/**
* Navigation class.
*
* @package Modules\QualityAssurance\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\QualityAssurance\Admin
* @copyright Dennis Eichhorn
* @license OMS License 2.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
namespace Modules\QualityAssurance\Admin;
use phpOMS\Module\InstallerAbstract;
/**
* Installer class.
*
* @package Modules\QualityAssurance\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\QualityAssurance\Admin
* @copyright Dennis Eichhorn
* @license OMS License 2.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
namespace Modules\QualityAssurance\Admin;
use phpOMS\Module\StatusAbstract;
/**
* Status class.
*
* @package Modules\QualityAssurance\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\QualityAssurance\Admin
* @copyright Dennis Eichhorn
* @license OMS License 2.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
namespace Modules\QualityAssurance\Admin;
use phpOMS\Module\UninstallerAbstract;
/**
* Uninstaller class.
*
* @package Modules\QualityAssurance\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\QualityAssurance\Admin
* @copyright Dennis Eichhorn
* @license OMS License 2.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
namespace Modules\QualityAssurance\Admin;
use phpOMS\Module\UpdaterAbstract;
/**
* Updater class.
*
* @package Modules\QualityAssurance\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\QualityAssurance
* @copyright Dennis Eichhorn
* @license OMS License 2.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
namespace Modules\QualityAssurance\Controller;
/**
* QualityAssurance controller class.
*
* @package Modules\QualityAssurance
* @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\QualityAssurance
* @copyright Dennis Eichhorn
* @license OMS License 2.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
namespace Modules\QualityAssurance\Controller;
use phpOMS\Module\ModuleAbstract;
use phpOMS\Module\WebInterface;
/**
* QualityAssurance controller class.
*
* @package Modules\QualityAssurance
* @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 = 'QualityAssurance';
/**
* Module id.
*
* @var int
* @since 1.0.0
*/
public const MODULE_ID = 1008700000;
/**
* 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": 1008700000,
"internal": "QualityAssurance",
"external": "QualityAssurance"
},
"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": "QualityAssurance",
"dependencies": {
"Admin": "1.0.0",
"Tasks": "1.0.0",
"Tools": "1.0.0"
},
"providing": {
"Navigation": "*"
},
"load": [
{
"pid": [
"/qualitymanagement/qualityassurance"
],
"type": 4,
"for": "Content",
"file": "QualityAssurance",
"from": "QualityAssurance"
},
{
"pid": [
"/"
],
"type": 5,
"from": "QualityAssurance",
"for": "Navigation",
"file": "Navigation"
}
]
}

View File

@ -21,7 +21,7 @@ final class AdminTest extends \PHPUnit\Framework\TestCase
{
protected const NAME = 'QualityAssurance';
protected const URI_LOAD = '';
protected const URI_LOAD = 'http://127.0.0.1/en/backend/qualitymanagement/qualityassurance';
use \tests\Modules\ModuleTestTrait;
}