From 248d3b356cf836e93d1eaae4148cc7adc898314b Mon Sep 17 00:00:00 2001 From: liyang Date: Thu, 22 May 2025 13:48:42 +0800 Subject: [PATCH] * [uitest] add ui test coverage report. --- test/lib/coverage.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/lib/coverage.php b/test/lib/coverage.php index 868b8116fc..7cbdaee746 100644 --- a/test/lib/coverage.php +++ b/test/lib/coverage.php @@ -252,6 +252,17 @@ class coverage foreach($lines as $line) { + $trimmed = trim($line); + + // 跳过class定义行 + if(preg_match('/^class\s+/i', $trimmed)) continue; + + // 跳过function定义行 + if(strpos($trimmed, 'function') !== false) continue; + + // 跳过php定义行 + if(strpos($trimmed, '') !== false) continue; + } return $lineCount;