* Extract unit test.

This commit is contained in:
wangyidong
2024-07-01 08:54:03 +08:00
committed by 田淑杰
parent 19548b2f88
commit 2988c1947d
3 changed files with 33 additions and 13 deletions
+20 -9
View File
@@ -11,8 +11,19 @@ zenData('user')->gen('5');
/**
title=测试 myModel->getReviewingStories();
timeout=0
cid=1
pid=1
- 测试获取用户 account 排序 id_desc 的需求id。 @8,6,2
- 测试获取用户 account 排序 id_desc 的需求是否存在。 @exist
- 测试获取用户 account 排序 id_asc 的需求id。 @2,6,8
- 测试获取用户 account 排序 id_asc 的需求是否存在。 @exist
- 测试获取用户 account 排序 id_desc 的需求id。 @empty
- 测试获取用户 account 排序 id_desc 的需求是否存在。 @empty
- 测试获取用户 account 排序 id_asc 的需求id。 @empty
- 测试获取用户 account 排序 id_asc 的需求是否存在。 @empty
*/
@@ -21,11 +32,11 @@ $orderBy = array('id_desc', 'id_asc');
$checkExist = array(false, true);
$my = new myTest();
r($my->getReviewingStoriesTest($account[0], $orderBy[0], $checkExist[0])) && p() && e('10,8,6,4,2'); // 测试获取用户 account 排序 id_desc 的需求id。
r($my->getReviewingStoriesTest($account[0], $orderBy[0], $checkExist[1])) && p() && e('exist'); // 测试获取用户 account 排序 id_desc 的需求是否存在。
r($my->getReviewingStoriesTest($account[0], $orderBy[1], $checkExist[0])) && p() && e('2,4,6,8,10'); // 测试获取用户 account 排序 id_asc 的需求id。
r($my->getReviewingStoriesTest($account[0], $orderBy[1], $checkExist[1])) && p() && e('exist'); // 测试获取用户 account 排序 id_asc 的需求是否存在。
r($my->getReviewingStoriesTest($account[1], $orderBy[0], $checkExist[0])) && p() && e('empty'); // 测试获取用户 account 排序 id_desc 的需求id。
r($my->getReviewingStoriesTest($account[1], $orderBy[0], $checkExist[1])) && p() && e('empty'); // 测试获取用户 account 排序 id_desc 的需求是否存在。
r($my->getReviewingStoriesTest($account[1], $orderBy[1], $checkExist[0])) && p() && e('empty'); // 测试获取用户 account 排序 id_asc 的需求id。
r($my->getReviewingStoriesTest($account[1], $orderBy[1], $checkExist[1])) && p() && e('empty'); // 测试获取用户 account 排序 id_asc 的需求是否存在。
r($my->getReviewingStoriesTest($account[0], $orderBy[0], $checkExist[0])) && p() && e('8,6,2'); // 测试获取用户 account 排序 id_desc 的需求id。
r($my->getReviewingStoriesTest($account[0], $orderBy[0], $checkExist[1])) && p() && e('exist'); // 测试获取用户 account 排序 id_desc 的需求是否存在。
r($my->getReviewingStoriesTest($account[0], $orderBy[1], $checkExist[0])) && p() && e('2,6,8'); // 测试获取用户 account 排序 id_asc 的需求id。
r($my->getReviewingStoriesTest($account[0], $orderBy[1], $checkExist[1])) && p() && e('exist'); // 测试获取用户 account 排序 id_asc 的需求是否存在。
r($my->getReviewingStoriesTest($account[1], $orderBy[0], $checkExist[0])) && p() && e('empty'); // 测试获取用户 account 排序 id_desc 的需求id。
r($my->getReviewingStoriesTest($account[1], $orderBy[0], $checkExist[1])) && p() && e('empty'); // 测试获取用户 account 排序 id_desc 的需求是否存在。
r($my->getReviewingStoriesTest($account[1], $orderBy[1], $checkExist[0])) && p() && e('empty'); // 测试获取用户 account 排序 id_asc 的需求id。
r($my->getReviewingStoriesTest($account[1], $orderBy[1], $checkExist[1])) && p() && e('empty'); // 测试获取用户 account 排序 id_asc 的需求是否存在。
+2 -1
View File
@@ -5,6 +5,7 @@ declare(strict_types=1);
/**
title=测试 myModel->getStoriesBySearch();
timeout=0
cid=1
- 测试获取 queryID 0 类型 contribute 排序 id_desc 的需求。 @17,13,8,7,6,3,2,1
@@ -49,4 +50,4 @@ r($my->getStoriesBySearchTest($queryID[0], $typeList[1], $orderBy[1])) && p() &&
r($my->getStoriesBySearchTest($queryID[1], $typeList[0], $orderBy[0])) && p() && e('17,13,1'); // 测试获取 queryID 1 类型 contribute 排序 id_desc 的需求。
r($my->getStoriesBySearchTest($queryID[1], $typeList[0], $orderBy[1])) && p() && e('1,13,17'); // 测试获取 queryID 1 类型 contribute 排序 id_asc 的需求。
r($my->getStoriesBySearchTest($queryID[1], $typeList[1], $orderBy[0])) && p() && e('16,13,1'); // 测试获取 queryID 1 类型 other 排序 id_desc 的需求。
r($my->getStoriesBySearchTest($queryID[1], $typeList[1], $orderBy[1])) && p() && e('1,13,16'); // 测试获取 queryID 1 类型 other 排序 id_asc 的需求。
r($my->getStoriesBySearchTest($queryID[1], $typeList[1], $orderBy[1])) && p() && e('1,13,16'); // 测试获取 queryID 1 类型 other 排序 id_asc 的需求。
+11 -3
View File
@@ -15,10 +15,18 @@ su('admin');
/**
title=测试 myModel->getTasksBySearch();
cid=1
pid=1
cid=0
获取task状态的项目 >> 批量任务三,wait
- 测试通过搜索获取用户 admin 的任务id @37,33,29,25,21,17,13,9,5,1
- 测试通过搜索获取用户 admin 的任务数量 @10
- 测试通过搜索获取用户 admin 的任务id 限制5 @37,33,29,25,21
- 测试通过搜索获取用户 admin 的任务数量 限制5 @5
- 测试通过搜索获取用户 user5 的任务id @0
- 测试通过搜索获取用户 user5 的任务数量 @0
- 测试通过搜索获取用户 user5 的任务id 限制5 @0
- 测试通过搜索获取用户 user5 的任务数量 限制5 @0
*/