From 74fb6b5bd85be7cdf3c4a0f5b760e5ea5dd9461f Mon Sep 17 00:00:00 2001 From: Chris Morgan Date: Wed, 27 Sep 2006 02:47:52 +0000 Subject: [PATCH] Flush the error log before performing the error log test, otherwise pending errors can throw the tests error count off and cause it to improperly fail --- unit_test/test_error_log.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/unit_test/test_error_log.php b/unit_test/test_error_log.php index d84f637..26f2b81 100644 --- a/unit_test/test_error_log.php +++ b/unit_test/test_error_log.php @@ -5,6 +5,8 @@ require_once(BASE."include/incl.php"); function test_error_log_log_error() { + error_log::flush(); /* flush the error log */ + error_log::log_error(ERROR_SQL, "This is a sql error"); error_log::log_error(ERROR_GENERAL, "This is a general error"); @@ -37,4 +39,4 @@ if(!test_error_log_log_error()) else echo "test_error_log_log_error() passed\n"; -?> \ No newline at end of file +?>