rename module constants and fix some unit test bugs

This commit is contained in:
Dennis Eichhorn 2021-09-28 18:28:43 +02:00
parent 9164a8101c
commit 9145d6b945
2 changed files with 9 additions and 9 deletions

View File

@ -23,7 +23,7 @@ return [
'dest' => '\Modules\Surveys\Controller\BackendController:setUpBackend',
'verb' => RouteVerb::GET,
'permission' => [
'module' => BackendController::MODULE_NAME,
'module' => BackendController::NAME,
'type' => PermissionType::READ,
'state' => PermissionState::SURVEY_ANSWER,
],
@ -34,7 +34,7 @@ return [
'dest' => '\Modules\Surveys\Controller\BackendController:viewSurveysList',
'verb' => RouteVerb::GET,
'permission' => [
'module' => BackendController::MODULE_NAME,
'module' => BackendController::NAME,
'type' => PermissionType::READ,
'state' => PermissionState::SURVEY_TEMPLATE,
],
@ -45,7 +45,7 @@ return [
'dest' => '\Modules\Surveys\Controller\BackendController:viewSurveysCreate',
'verb' => RouteVerb::GET,
'permission' => [
'module' => BackendController::MODULE_NAME,
'module' => BackendController::NAME,
'type' => PermissionType::CREATE,
'state' => PermissionState::SURVEY_TEMPLATE,
],
@ -56,7 +56,7 @@ return [
'dest' => '\Modules\Surveys\Controller\BackendController:viewSurveysEdit',
'verb' => RouteVerb::GET,
'permission' => [
'module' => BackendController::MODULE_NAME,
'module' => BackendController::NAME,
'type' => PermissionType::READ,
'state' => PermissionState::SURVEY_TEMPLATE,
],
@ -67,7 +67,7 @@ return [
'dest' => '\Modules\Surveys\Controller\BackendController:viewSurveysSurvey',
'verb' => RouteVerb::GET,
'permission' => [
'module' => BackendController::MODULE_NAME,
'module' => BackendController::NAME,
'type' => PermissionType::READ,
'state' => PermissionState::SURVEY_ANSWER,
],

View File

@ -33,7 +33,7 @@ class Controller extends ModuleAbstract implements WebInterface
* @var string
* @since 1.0.0
*/
public const MODULE_PATH = __DIR__ . '/../';
public const PATH = __DIR__ . '/../';
/**
* Module version.
@ -41,7 +41,7 @@ class Controller extends ModuleAbstract implements WebInterface
* @var string
* @since 1.0.0
*/
public const MODULE_VERSION = '1.0.0';
public const VERSION = '1.0.0';
/**
* Module name.
@ -49,7 +49,7 @@ class Controller extends ModuleAbstract implements WebInterface
* @var string
* @since 1.0.0
*/
public const MODULE_NAME = 'Surveys';
public const NAME = 'Surveys';
/**
* Module id.
@ -57,7 +57,7 @@ class Controller extends ModuleAbstract implements WebInterface
* @var int
* @since 1.0.0
*/
public const MODULE_ID = 1000800000;
public const ID = 1000800000;
/**
* Providing.