Index: modules/simpletest/drupal_web_test_case.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/drupal_web_test_case.php,v
retrieving revision 1.117
diff -u -r1.117 drupal_web_test_case.php
--- modules/simpletest/drupal_web_test_case.php	16 Jun 2009 04:43:47 -0000	1.117
+++ modules/simpletest/drupal_web_test_case.php	24 Jun 2009 01:33:58 -0000
@@ -944,6 +944,39 @@
     return md5($this->session_id . $value . $private_key);
   }
 
+  /**
+   * Verify a log entry was entered for a module's status change.
+   * Called in the same way of the expected original watchdog() execution.
+   *
+   * @param $type
+   *   The category to which this message belongs.
+   * @param $message
+   *   The message to store in the log. Keep $message translatable
+   *   by not concatenating dynamic values into it! Variables in the
+   *   message should be added by using placeholder strings alongside
+   *   the variables argument to declare the value of the placeholders.
+   *   See t() for documentation on how $message and $variables interact.
+   * @param $variables
+   *   Array of variables to replace in the message on display or
+   *   NULL if message is already translated or not possible to
+   *   translate.
+   * @param $severity
+   *   The severity of the message, as per RFC 3164.
+   * @param $link
+   *   A link to associate with the message.
+   */
+  function drupalGetLogMessage($type, $message, $variables = array(), $severity = WATCHDOG_NOTICE, $link = '') {
+    return db_select('watchdog', 'w')
+      ->condition('type', $type)
+      ->condition('message', $message)
+      ->condition('variables', serialize($variables))
+      ->condition('severity', $severity)
+      ->condition('link', $link)
+      ->countQuery()
+      ->execute()
+      ->fetchField();
+  }
+
   /*
    * Logs a user out of the internal browser, then check the login page to confirm logout.
    */
Index: modules/system/system.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.test,v
retrieving revision 1.50
diff -u -r1.50 system.test
--- modules/system/system.test	13 Jun 2009 21:08:31 -0000	1.50
+++ modules/system/system.test	24 Jun 2009 01:33:59 -0000
@@ -52,40 +52,6 @@
       $this->assertEqual(module_exists($module), $enabled, t($message, array('@module' => $module)));
     }
   }
-
-  /**
-   * Verify a log entry was entered for a module's status change.
-   * Called in the same way of the expected original watchdog() execution.
-   *
-   * @param $type
-   *   The category to which this message belongs.
-   * @param $message
-   *   The message to store in the log. Keep $message translatable
-   *   by not concatenating dynamic values into it! Variables in the
-   *   message should be added by using placeholder strings alongside
-   *   the variables argument to declare the value of the placeholders.
-   *   See t() for documentation on how $message and $variables interact.
-   * @param $variables
-   *   Array of variables to replace in the message on display or
-   *   NULL if message is already translated or not possible to
-   *   translate.
-   * @param $severity
-   *   The severity of the message, as per RFC 3164.
-   * @param $link
-   *   A link to associate with the message.
-   */
-  function assertLogMessage($type, $message, $variables = array(), $severity = WATCHDOG_NOTICE, $link = '') {
-    $count = db_select('watchdog', 'w')
-      ->condition('type', $type)
-      ->condition('message', $message)
-      ->condition('variables', serialize($variables))
-      ->condition('severity', $severity)
-      ->condition('link', $link)
-      ->countQuery()
-      ->execute()
-      ->fetchField();
-    $this->assertTrue($count > 0, t('watchdog table contains @count rows for @message', array('@count' => $count, '@message' => $message)));
-  }
 }
 
 /**
@@ -121,7 +87,9 @@
     $this->assertText(t('hook_modules_enabled fired for aggregator'), t('hook_modules_enabled fired.'));
     $this->assertModules(array('aggregator'), TRUE);
     $this->assertTableCount('aggregator', TRUE);
-    $this->assertLogMessage('system', "%module module enabled.", array('%module' => 'aggregator'), WATCHDOG_INFO);
+    $message_count = $this->drupalGetLogMessage('system', "%module module enabled.", array('%module' => 'aggregator'), WATCHDOG_INFO);
+    $this->assertTrue($message_count > 0, t('Logs contain @count rows for @message', array('@count' => $message_count)));
+
 
     // Disable aggregator, check tables, uninstall aggregator, check tables.
     $edit = array();
@@ -133,7 +101,8 @@
     $this->assertText(t('hook_modules_disabled fired for aggregator'), t('hook_modules_disabled fired.'));
     $this->assertModules(array('aggregator'), FALSE);
     $this->assertTableCount('aggregator', TRUE);
-    $this->assertLogMessage('system', "%module module disabled.", array('%module' => 'aggregator'), WATCHDOG_INFO);
+    $message_count = $this->drupalGetLogMessage('system', "%module module disabled.", array('%module' => 'aggregator'), WATCHDOG_INFO);
+    $this->assertTrue($message_count > 0, t('Logs contain @count rows for @message', array('@count' => $message_count)));
 
     // Uninstall the module.
     $edit = array();
@@ -147,7 +116,8 @@
     $this->assertText(t('hook_modules_uninstalled fired for aggregator'), t('hook_modules_uninstalled fired.'));
     $this->assertModules(array('aggregator'), FALSE);
     $this->assertTableCount('aggregator', FALSE);
-    $this->assertLogMessage('system', "%module module uninstalled.", array('%module' => 'aggregator'), WATCHDOG_INFO);
+    $message_count = $this->drupalGetLogMessage('system', "%module module uninstalled.", array('%module' => 'aggregator'), WATCHDOG_INFO);
+    $this->assertTrue($message_count > 0, t('Logs contain @count rows for uninstalled modules.', array('@count' => $message_count)));
   }
 }
 
