From 3e33be2b3913b080dd2648bc3ec53304f6b1fd8c Mon Sep 17 00:00:00 2001 From: wangyuting Date: Fri, 15 Dec 2023 10:27:20 +0800 Subject: [PATCH] * Fix doc unit test script. --- module/doc/model.php | 2 +- module/doc/test/model/builddocnode.php | 8 ++++---- module/doc/test/model/getlinkedexecutiondata.php | 2 +- module/doc/test/model/getstatisticinfo.php | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/module/doc/model.php b/module/doc/model.php index c0916ac567..abb270d008 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -2625,7 +2625,7 @@ class docModel extends model ->orWhere('(objectType')->eq('api') ->andWhere('objectID')->in(array_keys($apiList)) ->markRight(2) - ->orderBy('date_desc') + ->orderBy('date_desc,id_asc') ->page($pager) ->fetchAll(); diff --git a/module/doc/test/model/builddocnode.php b/module/doc/test/model/builddocnode.php index 1e36693292..69b4902197 100755 --- a/module/doc/test/model/builddocnode.php +++ b/module/doc/test/model/builddocnode.php @@ -123,7 +123,7 @@ r($docTester->buildDocNodeTest($normalModule, $libIds[2])) && p('type,docsCount, r($docTester->buildDocNodeTest($normalModule, $libIds[3])) && p('type,docsCount,actions') && e('module,0,~~'); // 测试模块为普通模块,libID不存在时,获取的文档节点数据 /* Not exist module object. */ -r($docTester->buildDocNodeTest($notExistModule, $libIds[0])) && p('type,docsCount,actions') && e('module,0,~~'); // 测试模块不存在,libID=0时,获取的文档节点数据 -r($docTester->buildDocNodeTest($notExistModule, $libIds[1])) && p('type,docsCount,actions') && e('module,0,~~'); // 测试模块不存在,libID=11时,获取的文档节点数据 -r($docTester->buildDocNodeTest($notExistModule, $libIds[2])) && p('type,docsCount,actions') && e('module,0,~~'); // 测试模块不存在,libID=13时,获取的文档节点数据 -r($docTester->buildDocNodeTest($notExistModule, $libIds[3])) && p('type,docsCount,actions') && e('module,0,N/A'); // 测试模块不存在,libID不存在时,获取的文档节点数据 +r($docTester->buildDocNodeTest($notExistModule, $libIds[0])) && p('type,docsCount,actions') && e('module,0,~~'); // 测试模块不存在,libID=0时,获取的文档节点数据 +r($docTester->buildDocNodeTest($notExistModule, $libIds[1])) && p('type,docsCount,actions') && e('module,0,~~'); // 测试模块不存在,libID=11时,获取的文档节点数据 +r($docTester->buildDocNodeTest($notExistModule, $libIds[2])) && p('type,docsCount,actions') && e('module,0,~~'); // 测试模块不存在,libID=13时,获取的文档节点数据 +r($docTester->buildDocNodeTest($notExistModule, $libIds[3])) && p('type,docsCount,actions') && e('module,0,~~'); // 测试模块不存在,libID不存在时,获取的文档节点数据 diff --git a/module/doc/test/model/getlinkedexecutiondata.php b/module/doc/test/model/getlinkedexecutiondata.php index 491a09e7c3..de6f70c02f 100755 --- a/module/doc/test/model/getlinkedexecutiondata.php +++ b/module/doc/test/model/getlinkedexecutiondata.php @@ -36,4 +36,4 @@ $executions = array(0, 101, 106); $docTester = new docTest(); r($docTester->getLinkedExecutionDataTest($executions[2])) && p('2', ';') && e('6,16'); // 获取系统中关联执行ID=106的数据 r($docTester->getLinkedExecutionDataTest($executions[1])) && p('1', ';') && e('1,11'); // 获取系统中关联执行ID=101的数据 -r($docTester->getLinkedExecutionDataTest($executions[0])) && p('0') && e('N/A'); // 获取系统中关联执行ID=0的数据 +r($docTester->getLinkedExecutionDataTest($executions[0])) && p('0') && e('~~'); // 获取系统中关联执行ID=0的数据 diff --git a/module/doc/test/model/getstatisticinfo.php b/module/doc/test/model/getstatisticinfo.php index 7231b8ee32..2d83afbce9 100755 --- a/module/doc/test/model/getstatisticinfo.php +++ b/module/doc/test/model/getstatisticinfo.php @@ -42,4 +42,4 @@ r($adminInfo) && p('myDoc:docViews,docCollects') && e('0,0'); /* User1 statistic information.*/ r($user1Info) && p('totalDocs,todayEditedDocs,myEditedDocs,myDocs') && e('50,0,10,0'); // 获取登录用户为user1时,文档总数、今日编辑文档数、用户编辑过的文档数、用户创建的文档数 -r($user1Info) && p('myDoc:docViews,docCollects') && e('N/A,N/A'); // 获取登录用户为user1时,用户浏览跟收藏的文档数 +r($user1Info) && p('myDoc:docViews,docCollects') && e('~~,~~'); // 获取登录用户为user1时,用户浏览跟收藏的文档数