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 4f6bedc3d2
commit 28dbecdec3
3 changed files with 11 additions and 11 deletions

View File

@ -23,7 +23,7 @@ return [
'dest' => '\Modules\Purchase\Controller\BackendController:viewPurchaseInvoiceCreate',
'verb' => RouteVerb::GET,
'permission' => [
'module' => BackendController::MODULE_NAME,
'module' => BackendController::NAME,
'type' => PermissionType::CREATE,
'state' => PermissionState::INVOICE,
],
@ -34,7 +34,7 @@ return [
'dest' => '\Modules\Purchase\Controller\BackendController:viewPurchaseInvoiceList',
'verb' => RouteVerb::GET,
'permission' => [
'module' => BackendController::MODULE_NAME,
'module' => BackendController::NAME,
'type' => PermissionType::READ,
'state' => PermissionState::INVOICE,
],
@ -45,7 +45,7 @@ return [
'dest' => '\Modules\Purchase\Controller\BackendController:viewPurchaseArticleList',
'verb' => RouteVerb::GET,
'permission' => [
'module' => BackendController::MODULE_NAME,
'module' => BackendController::NAME,
'type' => PermissionType::READ,
'state' => PermissionState::ARTICLE,
],
@ -56,7 +56,7 @@ return [
'dest' => '\Modules\Purchase\Controller\BackendController:viewPurchaseArticleCreate',
'verb' => RouteVerb::GET,
'permission' => [
'module' => BackendController::MODULE_NAME,
'module' => BackendController::NAME,
'type' => PermissionType::CREATE,
'state' => PermissionState::ARTICLE,
],
@ -67,7 +67,7 @@ return [
'dest' => '\Modules\Purchase\Controller\BackendController:viewPurchaseArticleProfile',
'verb' => RouteVerb::GET,
'permission' => [
'module' => BackendController::MODULE_NAME,
'module' => BackendController::NAME,
'type' => PermissionType::READ,
'state' => PermissionState::ARTICLE,
],
@ -78,7 +78,7 @@ return [
'dest' => '\Modules\Purchase\Controller\BackendController:viewPurchaseOrderSuggestion',
'verb' => RouteVerb::GET,
'permission' => [
'module' => BackendController::MODULE_NAME,
'module' => BackendController::NAME,
'type' => PermissionType::READ,
'state' => PermissionState::ARTICLE,
],

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 = 'Purchase';
public const NAME = 'Purchase';
/**
* Module id.
@ -56,7 +56,7 @@ class Controller extends ModuleAbstract
* @var int
* @since 1.0.0
*/
public const MODULE_ID = 1002100000;
public const ID = 1002100000;
/**
* Providing.

View File

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