From 75b03f93eda74a0ebe24ff3f37a5c2dd011c8c16 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Mon, 27 Nov 2023 17:29:15 +0800 Subject: [PATCH] * Fix unit test error. --- module/program/test/program.class.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/module/program/test/program.class.php b/module/program/test/program.class.php index 387f2a7da1..e7768283ef 100644 --- a/module/program/test/program.class.php +++ b/module/program/test/program.class.php @@ -594,4 +594,18 @@ class programTest return $this->program->dao->select('*')->from(TABLE_PROJECT)->where('type')->eq('program')->fetchAll('id'); } + + /** + * 该项目集下是否有未关闭的子项目集或项目。 + * Judge whether there is an unclosed programs or projects. + * + * @param int $programID + * @access public + * @return int + */ + public function hasUnfinishedChildrenTest(int $programID): int + { + $program = $this->program->getByID($programID); + return $this->program->hasUnfinishedChildren($program); + } }