* Refactor doc::setMenuByType unit test.

This commit is contained in:
tianshujie
2023-11-28 13:21:53 +08:00
parent c5275e8c7f
commit 35bfd55862
6 changed files with 174 additions and 13 deletions
+17 -4
View File
@@ -3,8 +3,11 @@ class docTest
{
public function __construct()
{
global $tester;
global $tester, $app;
$this->objectModel = $tester->loadModel('doc');
$app->rawModule = 'doc';
$app->rawMethod = 'index';
}
/**
@@ -546,10 +549,20 @@ class docTest
return $objects;
}
public function setMenuByTypeTest($type, $objectID, $libID, $appendLib = 0)
/**
* 设置文档的导航。
* Set doc menu by type.
*
* @param string $type mine|project|execution|product|custom
* @param int $objectID
* @param int $libID
* @param int $appendLib
* @access public
* @return array
*/
public function setMenuByTypeTest(string $type, int $objectID, int $libID, int $appendLib = 0): array
{
$objects = $this->objectModel->setMenuByType($type, $objectID, $libID, $appendLib = 0);
$objects = $this->objectModel->setMenuByType($type, $objectID, $libID, $appendLib);
if(dao::isError()) return dao::getError();
return $objects;