From a37eec024a0266ba7a7dfdb27901db77ef4893d4 Mon Sep 17 00:00:00 2001 From: wangyuting Date: Fri, 8 Aug 2025 16:35:29 +0800 Subject: [PATCH] * [task#147571,done,1h,0h] Optimize todo fetch unit test script. --- module/todo/test/tao/fetch.php | 60 +++++++++++++++++++++++++++++----- 1 file changed, 52 insertions(+), 8 deletions(-) diff --git a/module/todo/test/tao/fetch.php b/module/todo/test/tao/fetch.php index f8e83d9e2e..7190a1c985 100755 --- a/module/todo/test/tao/fetch.php +++ b/module/todo/test/tao/fetch.php @@ -2,12 +2,7 @@ loadYaml('fetch')->gen(10); -} /** @@ -15,12 +10,61 @@ title=测试完成待办 todoModel->finish(); timeout=0 cid=1 +- 查询id=1的todo属性 + - 属性id @1 + - 属性status @wait + - 属性account @admin + - 属性type @custom + - 属性name @自定义1的待办 +- 查询id=2的todo属性 + - 属性id @2 + - 属性status @doing + - 属性account @user1 + - 属性type @bug + - 属性name @BUG2的待办 +- 查询id=3的todo属性 + - 属性id @3 + - 属性status @done + - 属性account @user2 + - 属性type @task + - 属性name @任务3的待办 +- 查询id=5的todo属性 + - 属性id @5 + - 属性status @wait + - 属性account @user4 + - 属性type @testtask + - 属性name @测试单5的待办 +- 查询id=7的todo属性 + - 属性id @7 + - 属性status @done + - 属性account @user6 + - 属性type @bug + - 属性name @BUG7的待办 +- 查询id=9的todo属性 + - 属性id @9 + - 属性status @wait + - 属性account @user8 + - 属性type @story + - 属性name @需求9的待办 +- 查询id=10的todo属性 + - 属性id @10 + - 属性status @doing + - 属性account @user9 + - 属性type @testtask + - 属性name @测试单10的待办 + */ -initData(); +su('admin'); +zenData('todo')->gen(10); global $tester; $tester->loadModel('todo')->todoTao; -r($tester->todo->fetch(1)) && p('id,status') && e('1,wait'); // 查询id=1的todo并且验证状态 -r($tester->todo->fetch(9)) && p('id,status') && e('9,done'); // 查询id=9的todo并且验证状态 +r($tester->todo->fetch(1)) && p('id,status,account,type,name') && e('1,wait,admin,custom,自定义1的待办'); // 查询id=1的todo属性 +r($tester->todo->fetch(2)) && p('id,status,account,type,name') && e('2,doing,user1,bug,BUG2的待办'); // 查询id=2的todo属性 +r($tester->todo->fetch(3)) && p('id,status,account,type,name') && e('3,done,user2,task,任务3的待办'); // 查询id=3的todo属性 +r($tester->todo->fetch(5)) && p('id,status,account,type,name') && e('5,wait,user4,testtask,测试单5的待办'); // 查询id=5的todo属性 +r($tester->todo->fetch(7)) && p('id,status,account,type,name') && e('7,done,user6,bug,BUG7的待办'); // 查询id=7的todo属性 +r($tester->todo->fetch(9)) && p('id,status,account,type,name') && e('9,wait,user8,story,需求9的待办'); // 查询id=9的todo属性 +r($tester->todo->fetch(10)) && p('id,status,account,type,name') && e('10,doing,user9,testtask,测试单10的待办'); // 查询id=10的todo属性