* Unit test and adjust code
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user