Merge branch 'sprint/scx_testcase' of https://gitlab.zcorp.cc/easycorp/zentaopms into scx_testcase

This commit is contained in:
liyuchun
2022-05-09 07:43:25 +00:00
6 changed files with 78 additions and 40 deletions
+9 -2
View File
@@ -74,12 +74,17 @@ class apiTest
return $objects;
}
public function updateTest($apiID)
public function updateTest($apiID, $params, $confirm = true)
{
global $tester;
$_POST = $params;
$objects = $this->objectModel->update($apiID);
if(dao::isError()) return dao::getError();
if($confirm) $tester->dao->delete()->from(TABLE_API)->where('id')->eq($apiID)->exec();
return $objects;
}
@@ -120,12 +125,14 @@ class apiTest
return $objects;
}
public function getReleaseListByApiTest($libID)
public function getReleaseListByApiTest($libID, $id = 0, $confirm = true)
{
$objects = $this->objectModel->getReleaseListByApi($libID);
if(dao::isError()) return dao::getError();
if($confirm) $this->objectModel->deleteRelease($objects[$id]->id);
return $objects;
}