ai-chore(config): 调整流程配置及改进测试代码
- 将 FLOW_USE_CUSTOM_PROCESS 从 true 改为 false,禁用自定义流程 - 在 BlockTest 测试用例中改用 setBlockMode 方法设置阻断模式 - 设置统一的错误处理,将错误转为异常抛出 - 重命名 BlockTest 测试文件路径,优化测试组织结构 - 更新 IDE php include paths,调整依赖包引用顺序 - 删除无用的 tests/flow/Test.php 测试文件 - 微调 start.php、webman、windows.php 配置或代码模块
This commit is contained in:
@@ -1,13 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace flow;
|
||||
|
||||
use tests\flow\TestCase;
|
||||
|
||||
class Test extends TestCase
|
||||
{
|
||||
public function testExample()
|
||||
{
|
||||
$this->assertEquals(1, 1);
|
||||
}
|
||||
}
|
||||
@@ -35,7 +35,7 @@ class BlockTest extends TestCase
|
||||
$this->processor->reset();
|
||||
|
||||
// 恢复原始 blockMode 值
|
||||
Config::getInstance()->blockMode = $this->originalBlockMode;
|
||||
Config::getInstance()->setBlockMode($this->originalBlockMode);
|
||||
}
|
||||
|
||||
// ==================== 7. 流程阻断逻辑正确性 ====================
|
||||
@@ -77,7 +77,7 @@ class BlockTest extends TestCase
|
||||
public function testTimeValidationBlockWithBlockModeOn(): void
|
||||
{
|
||||
// 开启阻断模式
|
||||
Config::getInstance()->blockMode = true;
|
||||
Config::getInstance()->setBlockMode(true);
|
||||
|
||||
// 创建一个时间不足的场景(只有5秒)
|
||||
$context = $this->processor->createContextBuilder()
|
||||
@@ -104,7 +104,7 @@ class BlockTest extends TestCase
|
||||
public function testTimeValidationWithBlockModeOff(): void
|
||||
{
|
||||
// 关闭阻断模式
|
||||
Config::getInstance()->blockMode = false;
|
||||
Config::getInstance()->setBlockMode(false);
|
||||
|
||||
// 创建一个时间不足的场景
|
||||
$context = $this->processor->createContextBuilder()
|
||||
@@ -153,7 +153,7 @@ class BlockTest extends TestCase
|
||||
public function testTimeValidationPass(): void
|
||||
{
|
||||
// 开启阻断模式
|
||||
Config::getInstance()->blockMode = true;
|
||||
Config::getInstance()->setBlockMode(true);
|
||||
|
||||
// 创建时长达标的场景(120秒,超过最低要求)
|
||||
$context = $this->processor->createContextBuilder()
|
||||
Reference in New Issue
Block a user