* Unit test and adjust code

This commit is contained in:
zenggang
2022-01-25 08:33:21 +00:00
parent 6766cbe5f0
commit 5f83afb622
8 changed files with 80 additions and 43 deletions
+4 -2
View File
@@ -11,7 +11,7 @@ pid=1
通过gitlabID,projectID,获取GitLab分支列表 >> 1
通过gitlabID,projectID,获取GitLab分支数量 >> 1
当前项目没有分支时,获取GitLab分支列表 >> 0
当gitlabID存在,projectID不存在时,获取GitLab分支列表 >> 404 Project Not Found
当gitlabID存在,projectID不存在时,获取GitLab分支列表 >> return empty
当gitlabID,projectID都为0时,获取GitLab分支列表 >> return empty
*/
@@ -30,7 +30,9 @@ r(count($gitlab->apiGetBranches($gitlabID, $projectID))) && p() && e(0); //当
$gitlabID = 1;
$projectID = 0;
r($gitlab->apiGetBranches($gitlabID, $projectID)) && p('message') && e('404 Project Not Found'); //通过gitlabID,projectID,获取GitLab分支列表
$result = $gitlab->apiGetBranches($gitlabID, $projectID);
if(empty($result)) $result = 'return empty';
r($result) && p() && e('return empty'); //当gitlabID存在,projectID不存在时,获取GitLab分支列表
$gitlabID = 0;
$projectID = 0;