* Refactor testcaseModel::getScenesName, add its unit test, and add default value for function.

This commit is contained in:
liumengyi
2023-09-14 09:21:53 +08:00
parent fe3053e1e4
commit d000bf362a
4 changed files with 73 additions and 31 deletions
+16 -1
View File
@@ -141,7 +141,7 @@ class testcaseTest
* @access public
* @return array|int
*/
public function getExecutionCasesTest(string $browseType = '', int $executionID): array|int
public function getExecutionCasesTest(string $browseType = '', int $executionID = 0): array|int
{
$objects = $this->objectModel->getExecutionCases($browseType, $executionID);
@@ -1346,4 +1346,19 @@ class testcaseTest
if(dao::isError()) return dao::getError();
return implode(',', $idList);
}
/**
* 测试获取所有的子场景 id。
* Test get all children id.
*
* @param array $sceneIdList
* @access public
* @return array
*/
public function getScenesNameTest(array $sceneIdList, bool $fullPath = true): array
{
$return = $this->objectModel->getScenesName($sceneIdList, $fullPath);
if(dao::isError()) return dao::getError();
return $return;
}
}