* [unittest] modify unittest.

This commit is contained in:
sunguangming
2025-06-05 08:00:58 +00:00
parent b4b5443fe8
commit 3ecccaf248
2 changed files with 16 additions and 2 deletions
@@ -28,8 +28,8 @@ $product->gen(10);
/**
title=测试 programModel::getProductPairs();
timeout=0
cid=1
pid=1
- 获取项目集1下的所有产品数量 @10
- 根据项目集ID获取关联产品名字属性2 @产品2
@@ -48,4 +48,4 @@ r(count($products1)) && p() && e('10'); // 获取项目集1下的所有产
r($products1) && p('2') && e('产品2'); // 根据项目集ID获取关联产品名字
r(count($products2)) && p() && e('5'); // 获取项目集1下的未关闭的产品数量
r($products2) && p('3') && e('产品3'); // 根据项目或项目集ID获取关联产品详情
r($products2) && p('4') && e('~~'); // 根据项目或项目集ID获取关联产品详情
r($products2) && p('4') && e('~~'); // 根据项目或项目集ID获取关联产品详情
+14
View File
@@ -20,12 +20,26 @@ title=测试 programModel::setTreePath();
timeout=0
cid=1
- 设置之前的项目集的path属性path @,10,
- 设置之后的项目集的path属性path @,1,10,
- 传入0的情况 @0
- 其他项目集的path属性path @0
- 其他项目集的path属性path @0
*/
$programTester = new programTest();
$before = $programTester->getByIDTest(10);
$after = $programTester->setTreePathTest(10);
$error = $programTester->setTreePathTest(0);
r($before) && p('path', ';') && e(',10,'); // 设置之前的项目集的path
r($after) && p('path', ';') && e(',1,10,'); // 设置之后的项目集的path
r($error) && p('') && e('0'); // 传入0的情况
$before = $programTester->getByIDTest(9);
$after = $programTester->setTreePathTest(9);
r($before) && p('path', ';') && e('0'); // 其他项目集的path
r($after) && p('path', ';') && e('0'); // 其他项目集的path