rename module constants and fix some unit test bugs

This commit is contained in:
Dennis Eichhorn 2021-09-28 18:28:42 +02:00
parent b0aa60a334
commit f87c7462d7
4 changed files with 13 additions and 13 deletions

View File

@ -23,7 +23,7 @@ return [
'dest' => '\Modules\Exchange\Controller\ApiController:apiExchangeImport', 'dest' => '\Modules\Exchange\Controller\ApiController:apiExchangeImport',
'verb' => RouteVerb::SET, 'verb' => RouteVerb::SET,
'permission' => [ 'permission' => [
'module' => ApiController::MODULE_NAME, 'module' => ApiController::NAME,
'type' => PermissionType::CREATE, 'type' => PermissionType::CREATE,
'state' => PermissionState::IMPORT, 'state' => PermissionState::IMPORT,
], ],
@ -34,7 +34,7 @@ return [
'dest' => '\Modules\Exchange\Controller\ApiController:apiExchangeExport', 'dest' => '\Modules\Exchange\Controller\ApiController:apiExchangeExport',
'verb' => RouteVerb::SET, 'verb' => RouteVerb::SET,
'permission' => [ 'permission' => [
'module' => ApiController::MODULE_NAME, 'module' => ApiController::NAME,
'type' => PermissionType::CREATE, 'type' => PermissionType::CREATE,
'state' => PermissionState::EXPORT, 'state' => PermissionState::EXPORT,
], ],

View File

@ -23,7 +23,7 @@ return [
'dest' => '\Modules\Exchange\Controller\BackendController:viewExchangeImportList', 'dest' => '\Modules\Exchange\Controller\BackendController:viewExchangeImportList',
'verb' => RouteVerb::GET, 'verb' => RouteVerb::GET,
'permission' => [ 'permission' => [
'module' => BackendController::MODULE_NAME, 'module' => BackendController::NAME,
'type' => PermissionType::READ, 'type' => PermissionType::READ,
'state' => PermissionState::IMPORT, 'state' => PermissionState::IMPORT,
], ],
@ -34,7 +34,7 @@ return [
'dest' => '\Modules\Exchange\Controller\BackendController:viewExchangeExportList', 'dest' => '\Modules\Exchange\Controller\BackendController:viewExchangeExportList',
'verb' => RouteVerb::GET, 'verb' => RouteVerb::GET,
'permission' => [ 'permission' => [
'module' => BackendController::MODULE_NAME, 'module' => BackendController::NAME,
'type' => PermissionType::READ, 'type' => PermissionType::READ,
'state' => PermissionState::EXPORT, 'state' => PermissionState::EXPORT,
], ],
@ -45,7 +45,7 @@ return [
'dest' => '\Modules\Exchange\Controller\BackendController:viewExchangeImport', 'dest' => '\Modules\Exchange\Controller\BackendController:viewExchangeImport',
'verb' => RouteVerb::GET, 'verb' => RouteVerb::GET,
'permission' => [ 'permission' => [
'module' => BackendController::MODULE_NAME, 'module' => BackendController::NAME,
'type' => PermissionType::READ, 'type' => PermissionType::READ,
'state' => PermissionState::IMPORT, 'state' => PermissionState::IMPORT,
], ],
@ -56,7 +56,7 @@ return [
'dest' => '\Modules\Exchange\Controller\BackendController:viewExchangeExport', 'dest' => '\Modules\Exchange\Controller\BackendController:viewExchangeExport',
'verb' => RouteVerb::GET, 'verb' => RouteVerb::GET,
'permission' => [ 'permission' => [
'module' => BackendController::MODULE_NAME, 'module' => BackendController::NAME,
'type' => PermissionType::READ, 'type' => PermissionType::READ,
'state' => PermissionState::EXPORT, 'state' => PermissionState::EXPORT,
], ],
@ -67,7 +67,7 @@ return [
'dest' => '\Modules\Exchange\Controller\BackendController:viewExchangeLogList', 'dest' => '\Modules\Exchange\Controller\BackendController:viewExchangeLogList',
'verb' => RouteVerb::GET, 'verb' => RouteVerb::GET,
'permission' => [ 'permission' => [
'module' => BackendController::MODULE_NAME, 'module' => BackendController::NAME,
'type' => PermissionType::READ, 'type' => PermissionType::READ,
'state' => PermissionState::DASHBOARD, 'state' => PermissionState::DASHBOARD,
], ],
@ -78,7 +78,7 @@ return [
'dest' => '\Modules\Exchange\Controller\BackendController:viewExchangeLog', 'dest' => '\Modules\Exchange\Controller\BackendController:viewExchangeLog',
'verb' => RouteVerb::GET, 'verb' => RouteVerb::GET,
'permission' => [ 'permission' => [
'module' => BackendController::MODULE_NAME, 'module' => BackendController::NAME,
'type' => PermissionType::READ, 'type' => PermissionType::READ,
'state' => PermissionState::DASHBOARD, 'state' => PermissionState::DASHBOARD,
], ],

View File

@ -32,7 +32,7 @@ class Controller extends ModuleAbstract
* @var string * @var string
* @since 1.0.0 * @since 1.0.0
*/ */
public const MODULE_PATH = __DIR__ . '/../'; public const PATH = __DIR__ . '/../';
/** /**
* Module version. * Module version.
@ -40,7 +40,7 @@ class Controller extends ModuleAbstract
* @var string * @var string
* @since 1.0.0 * @since 1.0.0
*/ */
public const MODULE_VERSION = '1.0.0'; public const VERSION = '1.0.0';
/** /**
* Module name. * Module name.
@ -48,7 +48,7 @@ class Controller extends ModuleAbstract
* @var string * @var string
* @since 1.0.0 * @since 1.0.0
*/ */
public const MODULE_NAME = 'Exchange'; public const NAME = 'Exchange';
/** /**
* Module id. * Module id.
@ -56,7 +56,7 @@ class Controller extends ModuleAbstract
* @var int * @var int
* @since 1.0.0 * @since 1.0.0
*/ */
public const MODULE_ID = 1007000000; public const ID = 1007000000;
/** /**
* Providing. * Providing.

View File

@ -19,7 +19,7 @@ namespace Modules\Exchange\tests\Admin;
*/ */
class AdminTest extends \PHPUnit\Framework\TestCase class AdminTest extends \PHPUnit\Framework\TestCase
{ {
protected const MODULE_NAME = 'Exchange'; protected const NAME = 'Exchange';
protected const URI_LOAD = ''; protected const URI_LOAD = '';