* Add unit test for action getTrashObjectTypes.

This commit is contained in:
wangxuepeng
2023-09-22 08:36:07 +00:00
parent e716f2fa86
commit a167676e3b
2 changed files with 24 additions and 4 deletions
@@ -4,14 +4,16 @@ include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/action.class.php';
su('admin');
zdTable('action')->config('action')->gen(20);
/**
title=测试 actionModel->getTrashObjectTypes();
cid=1
pid=1
查询type all 的对象类型列表 >> story
查询type all 的对象类型列表 >> testcase
查询type all 的对象类型列表 >> story
查询type hidden 的对象类型列表 >> testcase
*/
@@ -19,5 +21,5 @@ $typeList = array('all', 'hidden');
$action = new actionTest();
r($action->getTrashObjectTypesTest($typeList[0])) && p('story:objectType') && e('story'); // 查询type all 的对象类型列表
r($action->getTrashObjectTypesTest($typeList[1])) && p('testcase:objectType') && e('testcase'); // 查询type all 的对象类型列表
r($action->getTrashObjectTypesTest($typeList[0])) && p('story:objectType') && e('story'); // 查询type all 的对象类型列表
r($action->getTrashObjectTypesTest($typeList[1])) && p('testcase:objectType') && e('testcase'); // 查询type hidden 的对象类型列表
@@ -0,0 +1,18 @@
title: table zt_action
desc: "系统日志"
author: Wang XuePeng
version: "1.0"
fields:
- field: objectType
note: "类型"
range: story,testcase
format: ""
- field: action
note: "动作"
range: deleted
postfix: ""
loop: 0
format: ""
- field: extra
note: "注释"
range: "[1,2]{100!}"