+ Add unit test case for gitlab->webhookSyncIssue.

This commit is contained in:
caoyanyi
2024-01-12 11:14:10 +08:00
parent 7d8aa0217c
commit 6970731229
3 changed files with 63 additions and 1 deletions
+14
View File
@@ -429,6 +429,20 @@ class gitlabTest
return $result;
}
/**
* Test webhookSyncIssue method.
*
* @param object $issue
* @access public
* @return array|object|false
*/
public function webhookSyncIssueTest(object $issue): array|object|false
{
$result = $this->gitlab->webhookSyncIssue($issue);
if(dao::isError()) return dao::getError();
return $result ? $this->gitlab->loadModel($issue->objectType)->getByID($issue->objectID) : false;
}
public function apiGetTest(int|string $host, string $api)
{
$result = $this->gitlab->apiGet($host, $api);