From 3aaa5e2a4f27b921cccbfdb6ed8dd528e0f996b4 Mon Sep 17 00:00:00 2001 From: wangxiaomeng Date: Sat, 7 May 2022 15:30:01 +0800 Subject: [PATCH 1/2] edit doc --- test/class/doc.class.php | 22 ++++++++++++++++++++-- test/model/doc/checkautoloadpage.php | 10 +++++++--- test/model/doc/gettoandcclist.php | 10 +++++++--- 3 files changed, 34 insertions(+), 8 deletions(-) mode change 100644 => 100755 test/model/doc/checkautoloadpage.php mode change 100644 => 100755 test/model/doc/gettoandcclist.php diff --git a/test/class/doc.class.php b/test/class/doc.class.php index 143e7413aa..dfd073b87f 100644 --- a/test/class/doc.class.php +++ b/test/class/doc.class.php @@ -451,8 +451,17 @@ class docTest return $objects; } - public function getToAndCcListTest($doc) + /** + * Get toList and ccList. + * + * @param int $docID + * @access public + * @return bool|array + */ + + public function getToAndCcListTest($docID) { + $doc = $this->objectModel->getByID($docID); $objects = $this->objectModel->getToAndCcList($doc); if(dao::isError()) return dao::getError(); @@ -505,8 +514,17 @@ class docTest return $objects; } - public function checkAutoloadPageTest($doc) + /** + * Whether the url of link type documents needs to be autoloaded. + * + * @param int $docID + * @access public + * @return bool + */ + + public function checkAutoloadPageTest($docID) { + $doc = $this->objectModel->getByID($docID); $objects = $this->objectModel->checkAutoloadPage($doc); if(dao::isError()) return dao::getError(); diff --git a/test/model/doc/checkautoloadpage.php b/test/model/doc/checkautoloadpage.php old mode 100644 new mode 100755 index 4d77393db1..4ca8c0e86d --- a/test/model/doc/checkautoloadpage.php +++ b/test/model/doc/checkautoloadpage.php @@ -10,10 +10,14 @@ title=测试 docModel->checkAutoloadPage(); cid=1 pid=1 - - +查询文档type为text时数据 >>1 +查询文档type为markdown时数据 >>1 +查询文档不存在时数据 >>1 */ +$docID = array('1', '3', ''); $doc = new docTest(); -r($doc->checkAutoloadPageTest()) && p() && e(); \ No newline at end of file +r($doc->checkAutoloadPageTest($docID[0])) && p() && e('1'); //查询文档type为text时数据 +r($doc->checkAutoloadPageTest($docID[1])) && p() && e('1'); //查询文档type为markdown时数据 +r($doc->checkAutoloadPageTest($docID[2])) && p() && e('1'); //查询文档不存在时数据 diff --git a/test/model/doc/gettoandcclist.php b/test/model/doc/gettoandcclist.php old mode 100644 new mode 100755 index 8be6905993..bdab3aa14f --- a/test/model/doc/gettoandcclist.php +++ b/test/model/doc/gettoandcclist.php @@ -10,10 +10,14 @@ title=测试 docModel->getToAndCcList(); cid=1 pid=1 - - +查询文档type为text的数据 >> admin; +查询文档type为markdown的数据 >>admin; +查询文档type为url的数据 >>admin; */ +$docID = array('1', '2', '3'); $doc = new docTest(); -r($doc->getToAndCcListTest()) && p() && e(); \ No newline at end of file +r($doc->getToAndCcListTest($docID[0])) && p('0;1') && e('admin;'); //查询文档type为text的数据 +r($doc->getToAndCcListTest($docID[1])) && p('0;1') && e('admin;'); //查询文档type为markdown的数据 +r($doc->getToAndCcListTest($docID[2])) && p('0;1') && e('admin;'); //查询文档type为url的数据 From 5ba4a8bc7d286c8e1d6809dd42834ba0983852d4 Mon Sep 17 00:00:00 2001 From: wangxiaomeng Date: Mon, 9 May 2022 08:30:45 +0800 Subject: [PATCH 2/2] edit doc --- test/class/doc.class.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/test/class/doc.class.php b/test/class/doc.class.php index dfd073b87f..0077352cc7 100644 --- a/test/class/doc.class.php +++ b/test/class/doc.class.php @@ -458,7 +458,6 @@ class docTest * @access public * @return bool|array */ - public function getToAndCcListTest($docID) { $doc = $this->objectModel->getByID($docID); @@ -521,7 +520,6 @@ class docTest * @access public * @return bool */ - public function checkAutoloadPageTest($docID) { $doc = $this->objectModel->getByID($docID);