#!/usr/bin/env php loadYaml('dept_fixdeptpath', false, 2)->gen(10); // 3. 用户登录 su('admin'); // 4. 创建测试实例 $deptTest = new deptModelTest(); // 5. 执行测试步骤(必须包含至少5个测试步骤) r($deptTest->fixDeptPathTest()) && p() && e('1'); // 步骤1:验证fixDeptPath执行成功 r($deptTest->fixDeptPathTest()) && p() && e('1'); // 步骤2:再次验证fixDeptPath执行成功 r($deptTest->fixDeptPathCountTest()) && p() && e('10'); // 步骤3:验证部门数据总数为10 r($deptTest->fixDeptPathCountTest()) && p() && e('10'); // 步骤4:再次验证部门数据总数为10 r($deptTest->fixDeptPathTest()) && p() && e('1'); // 步骤5:验证fixDeptPath方法返回值为1