From 4c5daaf615d2eed5d0cd13da3518c8b1b1bec0fe Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Sat, 28 Dec 2024 00:21:21 +0700 Subject: [PATCH] refactor: more preg_match() and empty string only check --- system/Test/CIUnitTestCase.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/Test/CIUnitTestCase.php b/system/Test/CIUnitTestCase.php index c515b7e3d3c2..467e3a61bdf7 100644 --- a/system/Test/CIUnitTestCase.php +++ b/system/Test/CIUnitTestCase.php @@ -374,7 +374,7 @@ public function assertLogContains(string $level, string $logMessage, string $mes { $this->assertTrue( TestLogger::didLog($level, $logMessage, false), - $message !== '' && $message !== '0' ? $message : sprintf( + $message !== '' ? $message : sprintf( 'Failed asserting that logs have a record of message containing "%s" with level "%s".', $logMessage, $level