* [unittest] modify unittest.
This commit is contained in:
@@ -9,6 +9,12 @@ title=测试 todoTao::getTodoCountByAccount();
|
||||
timeout=0
|
||||
cid=1
|
||||
|
||||
- 判断用户为user1的待办事项数量为1 @1
|
||||
- 判断用户为admin的待办事项数量为1 @1
|
||||
- 判断用户为user2的待办事项数量为1 @1
|
||||
- 判断用户为user3的待办事项数量为0 @0
|
||||
- 判断用户为user4的待办事项数量为1 @1
|
||||
|
||||
*/
|
||||
|
||||
function initData ()
|
||||
@@ -21,9 +27,10 @@ initData();
|
||||
global $tester;
|
||||
$tester->loadModel('todo')->todoTao;
|
||||
|
||||
$account = array('user1', 'admin', 'user2', 'user3');
|
||||
$account = array('user1', 'admin', 'user2', 'user3', 'user4');
|
||||
|
||||
r($tester->todo->getTodoCountByAccount($account[0])) && p() && e('1'); // 判断用户为user1的待办事项数量为1
|
||||
r($tester->todo->getTodoCountByAccount($account[1])) && p() && e('1'); // 判断用户为admin的待办事项数量为1
|
||||
r($tester->todo->getTodoCountByAccount($account[2])) && p() && e('1'); // 判断用户为user2的待办事项数量为1
|
||||
r($tester->todo->getTodoCountByAccount($account[3])) && p() && e('0'); // 判断用户为user3的待办事项数量为0
|
||||
r($tester->todo->getTodoCountByAccount($account[4])) && p() && e('1'); // 判断用户为user4的待办事项数量为1
|
||||
Reference in New Issue
Block a user