\Tests\UnitLogOperMappingTest

操作日志映射纯逻辑

被测对象:LogOperMiddleware::resolveModuleLabel / resolveAction / resolveBusinessType 与 LogContext::maskSensitive(静态方法,只依赖 Request / 数组) 守护约定:模块中文名映射(含 org/tree → 组织架构);动作与业务类型方法映射 (GET export → 导出);敏感键任意层级掩码、普通值原样透传。

Summary

Methods
Properties
Constants
test_module_label_mapping()
test_action_resolution()
test_business_type_mapping()
test_sensitive_masking()
test_masking_returns_scalar_unchanged()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
request()
No private properties found
N/A

Methods

test_module_label_mapping()

test_module_label_mapping() : void

URI 首段 → 功能模块中文名:命中映射、org 归组织架构、未命中回落原段、非 admin 前缀不解析

test_action_resolution()

test_action_resolution() : void

GET/HEAD 查询、POST 新增、PUT/PATCH 修改、DELETE 删除、GET 含 export 段导出

test_business_type_mapping()

test_business_type_mapping() : void

动作 → 业务类型:ADD=1 UPDATE=2 DELETE=3 EXPORT=4 其它=0

test_sensitive_masking()

test_sensitive_masking() : void

敏感键任意层级掩码、普通值(含 0/'')原样透传

test_masking_returns_scalar_unchanged()

test_masking_returns_scalar_unchanged() : void

标量参数原样返回(GET 无 body 场景不抛错)

request()

request(string  $method, string  $path) : \Illuminate\Http\Request

按 method/path 构造请求

Parameters

string $method
string $path

Returns

\Illuminate\Http\Request —