mirror of
https://github.com/Karaka-Management/oms-Profile.git
synced 2026-02-15 14:58:40 +00:00
rename module constants and fix some unit test bugs
This commit is contained in:
parent
a5ce3a1514
commit
90dbd6d8b6
|
|
@ -25,7 +25,7 @@ return [
|
||||||
'dest' => '\Modules\Profile\Controller\ApiController:apiProfileCreate',
|
'dest' => '\Modules\Profile\Controller\ApiController:apiProfileCreate',
|
||||||
'verb' => RouteVerb::PUT,
|
'verb' => RouteVerb::PUT,
|
||||||
'permission' => [
|
'permission' => [
|
||||||
'module' => ApiController::MODULE_NAME,
|
'module' => ApiController::NAME,
|
||||||
'type' => PermissionType::CREATE,
|
'type' => PermissionType::CREATE,
|
||||||
'state' => PermissionState::PROFILE,
|
'state' => PermissionState::PROFILE,
|
||||||
],
|
],
|
||||||
|
|
@ -37,7 +37,7 @@ return [
|
||||||
'dest' => '\Modules\Admin\Controller\ApiController:apiSettingsAccountLocalizationSet',
|
'dest' => '\Modules\Admin\Controller\ApiController:apiSettingsAccountLocalizationSet',
|
||||||
'verb' => RouteVerb::SET,
|
'verb' => RouteVerb::SET,
|
||||||
'permission' => [
|
'permission' => [
|
||||||
'module' => AdminApiController::MODULE_NAME,
|
'module' => AdminApiController::NAME,
|
||||||
'type' => PermissionType::MODIFY,
|
'type' => PermissionType::MODIFY,
|
||||||
'state' => AdminPermissionState::ACCOUNT_SETTINGS,
|
'state' => AdminPermissionState::ACCOUNT_SETTINGS,
|
||||||
],
|
],
|
||||||
|
|
@ -48,7 +48,7 @@ return [
|
||||||
'dest' => '\Modules\Profile\Controller\ApiController:apiSettingsAccountImageSet',
|
'dest' => '\Modules\Profile\Controller\ApiController:apiSettingsAccountImageSet',
|
||||||
'verb' => RouteVerb::SET,
|
'verb' => RouteVerb::SET,
|
||||||
'permission' => [
|
'permission' => [
|
||||||
'module' => ApiController::MODULE_NAME,
|
'module' => ApiController::NAME,
|
||||||
'type' => PermissionType::MODIFY,
|
'type' => PermissionType::MODIFY,
|
||||||
'state' => PermissionState::PROFILE,
|
'state' => PermissionState::PROFILE,
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ return [
|
||||||
'dest' => '\Modules\Profile\Controller\BackendController:setupProfileStyles',
|
'dest' => '\Modules\Profile\Controller\BackendController:setupProfileStyles',
|
||||||
'verb' => RouteVerb::GET,
|
'verb' => RouteVerb::GET,
|
||||||
'permission' => [
|
'permission' => [
|
||||||
'module' => BackendController::MODULE_NAME,
|
'module' => BackendController::NAME,
|
||||||
'type' => PermissionType::READ,
|
'type' => PermissionType::READ,
|
||||||
'state' => PermissionState::PROFILE,
|
'state' => PermissionState::PROFILE,
|
||||||
],
|
],
|
||||||
|
|
@ -34,7 +34,7 @@ return [
|
||||||
'dest' => '\Modules\Profile\Controller\BackendController:viewProfileList',
|
'dest' => '\Modules\Profile\Controller\BackendController:viewProfileList',
|
||||||
'verb' => RouteVerb::GET,
|
'verb' => RouteVerb::GET,
|
||||||
'permission' => [
|
'permission' => [
|
||||||
'module' => BackendController::MODULE_NAME,
|
'module' => BackendController::NAME,
|
||||||
'type' => PermissionType::READ,
|
'type' => PermissionType::READ,
|
||||||
'state' => PermissionState::PROFILE,
|
'state' => PermissionState::PROFILE,
|
||||||
],
|
],
|
||||||
|
|
@ -45,7 +45,7 @@ return [
|
||||||
'dest' => '\Modules\Profile\Controller\BackendController:viewProfileSingle',
|
'dest' => '\Modules\Profile\Controller\BackendController:viewProfileSingle',
|
||||||
'verb' => RouteVerb::GET,
|
'verb' => RouteVerb::GET,
|
||||||
'permission' => [
|
'permission' => [
|
||||||
'module' => BackendController::MODULE_NAME,
|
'module' => BackendController::NAME,
|
||||||
'type' => PermissionType::READ,
|
'type' => PermissionType::READ,
|
||||||
'state' => PermissionState::PROFILE,
|
'state' => PermissionState::PROFILE,
|
||||||
],
|
],
|
||||||
|
|
@ -56,7 +56,7 @@ return [
|
||||||
'dest' => '\Modules\Profile\Controller\BackendController:viewProfileAdminSettings',
|
'dest' => '\Modules\Profile\Controller\BackendController:viewProfileAdminSettings',
|
||||||
'verb' => RouteVerb::GET,
|
'verb' => RouteVerb::GET,
|
||||||
'permission' => [
|
'permission' => [
|
||||||
'module' => BackendController::MODULE_NAME,
|
'module' => BackendController::NAME,
|
||||||
'type' => PermissionType::READ,
|
'type' => PermissionType::READ,
|
||||||
'state' => PermissionState::PROFILE,
|
'state' => PermissionState::PROFILE,
|
||||||
],
|
],
|
||||||
|
|
@ -67,7 +67,7 @@ return [
|
||||||
'dest' => '\Modules\Profile\Controller\BackendController:viewProfileAdminCreate',
|
'dest' => '\Modules\Profile\Controller\BackendController:viewProfileAdminCreate',
|
||||||
'verb' => RouteVerb::GET,
|
'verb' => RouteVerb::GET,
|
||||||
'permission' => [
|
'permission' => [
|
||||||
'module' => BackendController::MODULE_NAME,
|
'module' => BackendController::NAME,
|
||||||
'type' => PermissionType::READ,
|
'type' => PermissionType::READ,
|
||||||
'state' => PermissionState::PROFILE,
|
'state' => PermissionState::PROFILE,
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -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 = 'Profile';
|
public const NAME = 'Profile';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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 = 1000300000;
|
public const ID = 1000300000;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Providing.
|
* Providing.
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ namespace Modules\Profile\tests\Admin;
|
||||||
*/
|
*/
|
||||||
class AdminTest extends \PHPUnit\Framework\TestCase
|
class AdminTest extends \PHPUnit\Framework\TestCase
|
||||||
{
|
{
|
||||||
protected const MODULE_NAME = 'Profile';
|
protected const NAME = 'Profile';
|
||||||
|
|
||||||
protected const URI_LOAD = 'http://127.0.0.1/en/backend/profile';
|
protected const URI_LOAD = 'http://127.0.0.1/en/backend/profile';
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user