mirror of
https://github.com/Karaka-Management/oms-Draw.git
synced 2026-02-08 11:18:41 +00:00
rename module constants and fix some unit test bugs
This commit is contained in:
parent
cb7365cf30
commit
4c7ee265b4
|
|
@ -23,7 +23,7 @@ return [
|
||||||
'dest' => '\Modules\Draw\Controller\ApiController:apiDrawCreate',
|
'dest' => '\Modules\Draw\Controller\ApiController:apiDrawCreate',
|
||||||
'verb' => RouteVerb::SET,
|
'verb' => RouteVerb::SET,
|
||||||
'permission' => [
|
'permission' => [
|
||||||
'module' => ApiController::MODULE_NAME,
|
'module' => ApiController::NAME,
|
||||||
'type' => PermissionType::CREATE,
|
'type' => PermissionType::CREATE,
|
||||||
'state' => PermissionState::DRAW,
|
'state' => PermissionState::DRAW,
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ return [
|
||||||
'dest' => '\Modules\Draw\Controller\BackendController:setUpDrawEditor',
|
'dest' => '\Modules\Draw\Controller\BackendController:setUpDrawEditor',
|
||||||
'verb' => RouteVerb::GET,
|
'verb' => RouteVerb::GET,
|
||||||
'permission' => [
|
'permission' => [
|
||||||
'module' => BackendController::MODULE_NAME,
|
'module' => BackendController::NAME,
|
||||||
'type' => PermissionType::CREATE,
|
'type' => PermissionType::CREATE,
|
||||||
'state' => PermissionState::DRAW,
|
'state' => PermissionState::DRAW,
|
||||||
],
|
],
|
||||||
|
|
@ -32,7 +32,7 @@ return [
|
||||||
'dest' => '\Modules\Draw\Controller\BackendController:viewDrawCreate',
|
'dest' => '\Modules\Draw\Controller\BackendController:viewDrawCreate',
|
||||||
'verb' => RouteVerb::GET,
|
'verb' => RouteVerb::GET,
|
||||||
'permission' => [
|
'permission' => [
|
||||||
'module' => BackendController::MODULE_NAME,
|
'module' => BackendController::NAME,
|
||||||
'type' => PermissionType::CREATE,
|
'type' => PermissionType::CREATE,
|
||||||
'state' => PermissionState::DRAW,
|
'state' => PermissionState::DRAW,
|
||||||
],
|
],
|
||||||
|
|
@ -43,7 +43,7 @@ return [
|
||||||
'dest' => '\Modules\Draw\Controller\BackendController:viewDrawList',
|
'dest' => '\Modules\Draw\Controller\BackendController:viewDrawList',
|
||||||
'verb' => RouteVerb::GET,
|
'verb' => RouteVerb::GET,
|
||||||
'permission' => [
|
'permission' => [
|
||||||
'module' => BackendController::MODULE_NAME,
|
'module' => BackendController::NAME,
|
||||||
'type' => PermissionType::READ,
|
'type' => PermissionType::READ,
|
||||||
'state' => PermissionState::DRAW,
|
'state' => PermissionState::DRAW,
|
||||||
],
|
],
|
||||||
|
|
@ -54,7 +54,7 @@ return [
|
||||||
'dest' => '\Modules\Draw\Controller\BackendController:setUpDrawEditor',
|
'dest' => '\Modules\Draw\Controller\BackendController:setUpDrawEditor',
|
||||||
'verb' => RouteVerb::GET,
|
'verb' => RouteVerb::GET,
|
||||||
'permission' => [
|
'permission' => [
|
||||||
'module' => BackendController::MODULE_NAME,
|
'module' => BackendController::NAME,
|
||||||
'type' => PermissionType::READ,
|
'type' => PermissionType::READ,
|
||||||
'state' => PermissionState::DRAW,
|
'state' => PermissionState::DRAW,
|
||||||
],
|
],
|
||||||
|
|
@ -63,7 +63,7 @@ return [
|
||||||
'dest' => '\Modules\Draw\Controller\BackendController:viewDrawSingle',
|
'dest' => '\Modules\Draw\Controller\BackendController:viewDrawSingle',
|
||||||
'verb' => RouteVerb::GET,
|
'verb' => RouteVerb::GET,
|
||||||
'permission' => [
|
'permission' => [
|
||||||
'module' => BackendController::MODULE_NAME,
|
'module' => BackendController::NAME,
|
||||||
'type' => PermissionType::READ,
|
'type' => PermissionType::READ,
|
||||||
'state' => PermissionState::DRAW,
|
'state' => PermissionState::DRAW,
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -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 = 'Draw';
|
public const NAME = 'Draw';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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 = 1005200000;
|
public const ID = 1005200000;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Providing.
|
* Providing.
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ namespace Modules\Draw\tests\Admin;
|
||||||
*/
|
*/
|
||||||
class AdminTest extends \PHPUnit\Framework\TestCase
|
class AdminTest extends \PHPUnit\Framework\TestCase
|
||||||
{
|
{
|
||||||
protected const MODULE_NAME = 'Draw';
|
protected const NAME = 'Draw';
|
||||||
|
|
||||||
protected const URI_LOAD = 'http://127.0.0.1/en/backend/draw';
|
protected const URI_LOAD = 'http://127.0.0.1/en/backend/draw';
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user