test
This commit is contained in:
@@ -76,6 +76,50 @@ class ManualWashTest extends TestCase
|
||||
// 验证最终步骤成功
|
||||
$this->assertTrue($result5->isSuccess(), '干燥步骤 isSuccess() 应为 true');
|
||||
}
|
||||
/**
|
||||
* 测试完整手工洗流程:清洗 -> 漂洗 -> 消毒 -> 终末漂洗 -> 干燥
|
||||
* 使用真实环境引擎执行
|
||||
*/
|
||||
public function testCompleteManualWashProcess2(): void
|
||||
{
|
||||
$operator = '操作员 1';
|
||||
$endoscope = '胃镜 1';
|
||||
|
||||
// 步骤 1:清洗
|
||||
$result1 = $this->processor->swipe($operator, $endoscope, '清洗');
|
||||
$this->assertSuccess($result1, '清洗步骤应成功');
|
||||
$this->assertStep($result1, '清洗');
|
||||
$this->assertNeedDatabaseOperation($result1);
|
||||
$batchNo = $result1->getBatchNo();
|
||||
$this->assertNotEmpty($batchNo, '应生成批次号');
|
||||
|
||||
// 步骤 2:漂洗
|
||||
$result2 = $this->processor->swipe($operator, $endoscope, '漂洗');
|
||||
$this->assertSuccess($result2, '漂洗步骤应成功');
|
||||
$this->assertStep($result2, '漂洗');
|
||||
$this->assertBatchNoEquals($result2, $batchNo, '批次号应保持一致');
|
||||
|
||||
// 步骤 3:消毒
|
||||
$result3 = $this->processor->swipe($operator, $endoscope, '消毒');
|
||||
$this->assertSuccess($result3, '消毒步骤应成功');
|
||||
$this->assertStep($result3, '消毒');
|
||||
$this->assertBatchNoEquals($result3, $batchNo, '批次号应保持一致');
|
||||
|
||||
// 步骤 4:终末漂洗
|
||||
$result4 = $this->processor->swipe($operator, $endoscope, '终末漂洗');
|
||||
$this->assertSuccess($result4, '终末漂洗步骤应成功');
|
||||
$this->assertStep($result4, '终末漂洗');
|
||||
$this->assertBatchNoEquals($result4, $batchNo, '批次号应保持一致');
|
||||
|
||||
// 步骤 5:干燥
|
||||
$result5 = $this->processor->swipe($operator, $endoscope, '干燥');
|
||||
$this->assertSuccess($result5, '干燥步骤应成功');
|
||||
$this->assertStep($result5, '干燥');
|
||||
$this->assertBatchNoEquals($result5, $batchNo, '批次号应保持一致');
|
||||
|
||||
// 验证最终步骤成功
|
||||
$this->assertTrue($result5->isSuccess(), '干燥步骤 isSuccess() 应为 true');
|
||||
}
|
||||
|
||||
/**
|
||||
* 测试使用便捷方法执行完整手工洗流程
|
||||
|
||||
Reference in New Issue
Block a user