From b67664ddbd7f7b936f495c525d70c5ac48372a26 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Tue, 2 Jan 2024 13:53:50 +0800 Subject: [PATCH] * Change steps of the doc::summary unit test. --- module/doc/test/model/summary.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/module/doc/test/model/summary.php b/module/doc/test/model/summary.php index 41c2bb3a74..e797f05ef7 100755 --- a/module/doc/test/model/summary.php +++ b/module/doc/test/model/summary.php @@ -7,6 +7,8 @@ cid=1 - 测试没有附件的情况 @本页共 0 个附件,共计 0B,其中。 - 测试有附件的情况 @本页共 10 个附件,共计 159.2K,其中txt 1个、doc 1个、docx 1个、dot 1个、wps 1个、wri 1个、pdf 1个、ppt 1个、pptx 1个、xls 1个。 +- 测试附件ID有不存在附件的情况 @本页共 10 个附件,共计 159.2K,其中txt 1个、doc 1个、docx 1个、dot 1个、wps 1个、wri 1个、pdf 1个、ppt 1个、pptx 1个、xls 1个。 +- 测试附件ID不存在附件的情况 @本页共 0 个附件,共计 0B,其中。 */ include dirname(__FILE__, 5) . '/test/lib/init.php'; @@ -19,7 +21,11 @@ zdTable('user')->gen(5); $fileIds[0] = array(); $fileIds[1] = range(1, 10); +$fileIds[2] = range(1, 20); +$fileIds[3] = range(11, 20); $docTester = new docTest(); r($docTester->summaryTest($fileIds[0])) && p() && e('本页共 0 个附件,共计 0B,其中。'); // 测试没有附件的情况 r($docTester->summaryTest($fileIds[1])) && p() && e('本页共 10 个附件,共计 159.2K,其中txt 1个、doc 1个、docx 1个、dot 1个、wps 1个、wri 1个、pdf 1个、ppt 1个、pptx 1个、xls 1个。'); // 测试有附件的情况 +r($docTester->summaryTest($fileIds[2])) && p() && e('本页共 10 个附件,共计 159.2K,其中txt 1个、doc 1个、docx 1个、dot 1个、wps 1个、wri 1个、pdf 1个、ppt 1个、pptx 1个、xls 1个。'); // 测试附件ID有不存在附件的情况 +r($docTester->summaryTest($fileIds[3])) && p() && e('本页共 0 个附件,共计 0B,其中。'); // 测试附件ID不存在附件的情况