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 ca4df643e0
commit 17a87d8c8f
3 changed files with 9 additions and 9 deletions

View File

@ -23,7 +23,7 @@ return [
'dest' => '\Modules\Checklist\Controller\BackendController:viewChecklistList',
'verb' => RouteVerb::GET,
'permission' => [
'module' => BackendController::MODULE_NAME,
'module' => BackendController::NAME,
'type' => PermissionType::READ,
'state' => PermissionState::CHECKLIST,
],
@ -34,7 +34,7 @@ return [
'dest' => '\Modules\Checklist\Controller\BackendController:viewChecklistTemplateList',
'verb' => RouteVerb::GET,
'permission' => [
'module' => BackendController::MODULE_NAME,
'module' => BackendController::NAME,
'type' => PermissionType::READ,
'state' => PermissionState::TEMPLATE,
],
@ -45,7 +45,7 @@ return [
'dest' => '\Modules\Checklist\Controller\BackendController:viewChecklistTemplateCreate',
'verb' => RouteVerb::GET,
'permission' => [
'module' => BackendController::MODULE_NAME,
'module' => BackendController::NAME,
'type' => PermissionType::CREATE,
'state' => PermissionState::TEMPLATE,
],
@ -56,7 +56,7 @@ return [
'dest' => '\Modules\Checklist\Controller\BackendController:viewChecklistTemplateView',
'verb' => RouteVerb::GET,
'permission' => [
'module' => BackendController::MODULE_NAME,
'module' => BackendController::NAME,
'type' => PermissionType::READ,
'state' => PermissionState::TEMPLATE,
],

View File

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

View File

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