From 49efe1dc502be7bd92f7af18f2058fa6c0900b5a Mon Sep 17 00:00:00 2001 From: tianshujie Date: Thu, 14 Aug 2025 13:24:38 +0800 Subject: [PATCH] * [task#148029,done,0.15h] add step for summary method. --- module/doc/test/model/summary.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/module/doc/test/model/summary.php b/module/doc/test/model/summary.php index 95e5a2f534..8381ca2a3d 100755 --- a/module/doc/test/model/summary.php +++ b/module/doc/test/model/summary.php @@ -9,6 +9,7 @@ cid=1 - 测试有附件的情况 @本页共 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,其中。 +- 测试有附件ID不存在的情况 @本页共 10 个附件,共计 159.2K,其中txt 1个、doc 1个、docx 1个、dot 1个、wps 1个、wri 1个、pdf 1个、ppt 1个、pptx 1个、xls 1个。 */ include dirname(__FILE__, 5) . '/test/lib/init.php'; @@ -23,9 +24,11 @@ $fileIds[0] = array(); $fileIds[1] = range(1, 10); $fileIds[2] = range(1, 20); $fileIds[3] = range(11, 20); +$fileIds[4] = range(0, 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不存在附件的情况 +r($docTester->summaryTest($fileIds[4])) && 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不存在的情况