\Tests\FeatureJobCenterApiTest

测试基座(抽象基类)

被测对象:无(公共测试设施) 守护约定:Redis 直连用例在无 Redis 环境(如 CI)跳过而非失败(TEST_REQUIRE_REDIS=1 可强制失败); 缓存注册表最小 schema 供 sqlite :memory: 下凡走注册表的用例自建。

Summary

Methods
Properties
Constants
test_type_store_requires_binding_and_locks_code()
test_type_update_and_delete_guard()
test_type_test_dispatch_records_operator()
test_log_list_filter_detail_mask_and_not_found()
test_redispatch_and_cancel_endpoints()
test_stats_endpoint_returns_stats_and_worker()
test_prune_endpoint()
test_worker_control_writes_official_cache_keys()
test_worker_alarm_only_for_async_driver()
No public properties found
No constants found
createJobCenterSchema()
requireRedis()
buildCacheRegistry()
setUp()
No protected properties found
N/A
actAsSuper()
No private properties found
N/A

Methods

test_type_store_requires_binding_and_locks_code()

test_type_store_requires_binding_and_locks_code() : void

申请校验:邮件队列缺场景 422(required_if)/ 无效场景 400 不落半成品;绑场景 201;编码创建后不可改 422

test_type_update_and_delete_guard()

test_type_update_and_delete_guard() : void

编辑更新绑定与删除拦截:已有队列日志禁删(400),无记录可删(200)

test_type_test_dispatch_records_operator()

test_type_test_dispatch_records_operator() : void

测试投递:source=test + 操作人记录 + 台账建行

test_log_list_filter_detail_mask_and_not_found()

test_log_list_filter_detail_mask_and_not_found() : void

列表筛选 + 敏感掩码 + 超管明文 + 404 兜底

test_redispatch_and_cancel_endpoints()

test_redispatch_and_cancel_endpoints() : void

重投接口:parent 链 + 取消接口:仅待处理

test_stats_endpoint_returns_stats_and_worker()

test_stats_endpoint_returns_stats_and_worker() : void

统计接口:stats + worker 两段结构

test_prune_endpoint()

test_prune_endpoint() : void

清理接口:按保留天数删除并返回计数

test_worker_control_writes_official_cache_keys()

test_worker_control_writes_official_cache_keys() : void

暂停/恢复/重启走官方缓存键(界面零 shell 控制的数据基础;键 = illuminate:queue:paused:{连接}:{队列})

test_worker_alarm_only_for_async_driver()

test_worker_alarm_only_for_async_driver() : void

失联告警语义:sync 同步驱动无 worker 属正常形态不告警;异步驱动无心跳才告警

createJobCenterSchema()

createJobCenterSchema() : void

队列中心三表最小 schema(类型注册表 + 执行台账 + Laravel 原生队列表)

requireRedis()

requireRedis() : void

Redis 依赖探针:直连 Redis 的测试(限流/会话/验证码)在无 Redis 环境(如 CI) 跳过而非失败——其余用例不受影响。CI 可设 TEST_REQUIRE_REDIS=1 强制模式: Redis 不可达即失败而非跳过,安全回归套件不允许静默消失。

buildCacheRegistry()

buildCacheRegistry(array  $items) : void

建缓存注册表最小 schema(td_sys_cache)并灌入注册项。

测试跑 sqlite :memory:,生产迁移含 PostgreSQL 专属 DDL 跑不通(DataScopeServiceTest 同因自建 schema); 而 CacheManager::registry() 现已从数据库表读取——凡走注册表的测试(remember/get/key/失效推导) 必须在 setUp 先调用本方法,否则注册表为空、remember 未登记名会走「自动登记」路径。

Parameters

array $items

setUp()

setUp() : void

actAsSuper()

actAsSuper() : \App\Models\SysUser

构造已登录超管(详情明文 raw=1 与操作人记录用)

Returns

\App\Models\SysUser —