Index: index.php
===================================================================
RCS file: /cvs/drupal/drupal/index.php,v
retrieving revision 1.98
diff -u -r1.98 index.php
--- index.php	8 Feb 2009 20:27:51 -0000	1.98
+++ index.php	10 Jul 2009 20:36:37 -0000
@@ -19,6 +19,13 @@
 
 require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
 drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
+
+if (isset($_SERVER['HTTP_USER_AGENT']) && preg_match("/^simpletest\d+$/", $_SERVER['HTTP_USER_AGENT'])) {
+  // Log fatal errors.
+  ini_set('log_errors', 1);
+  ini_set('error_log', file_directory_path() . '/error.log');
+}
+
 $return = menu_execute_active_handler();
 
 // Menu status constants are integers; page content is a string or array.
Index: modules/simpletest/simpletest.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/simpletest.module,v
retrieving revision 1.60
diff -u -r1.60 simpletest.module
--- modules/simpletest/simpletest.module	7 Jul 2009 08:07:24 -0000	1.60
+++ modules/simpletest/simpletest.module	10 Jul 2009 20:36:38 -0000
@@ -233,10 +233,10 @@
           'line' => $match[3],
           'file' => $match[2],
         );
-        DrupalTestCase::assertStatic($test_id, $test_class, FALSE, $match[1], 'Fatal error', $caller);
+        DrupalTestCase::insertAssert($test_id, $test_class, FALSE, $match[1], 'Fatal error', $caller);
       }
       else {
-        DrupalTestCase::assertStatic($test_id, $test_class, FALSE, $line, 'Fatal error');
+        DrupalTestCase::insertAssert($test_id, $test_class, FALSE, $line, 'Fatal error');
       }
     }
   }
Index: modules/simpletest/drupal_web_test_case.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/drupal_web_test_case.php,v
retrieving revision 1.123
diff -u -r1.123 drupal_web_test_case.php
--- modules/simpletest/drupal_web_test_case.php	8 Jul 2009 07:23:23 -0000	1.123
+++ modules/simpletest/drupal_web_test_case.php	10 Jul 2009 20:36:38 -0000
@@ -138,11 +138,18 @@
   }
 
   /**
-   * Make assertions from outside the test case.
+   * Store an assertion from outside the testing context.
+   *
+   * This is useful for inserting assertions that can only be recorded after
+   * the test case has been destroyed, such as PHP fatal errors. The caller
+   * information is not automatically gathered since the caller is most likely
+   * inserting the assertion on behalf of other code. In all other respects
+   * the method behaves just like DrupalTestCase::assert() in terms of storing
+   * the assertion.
    *
    * @see DrupalTestCase::assert()
    */
-  public static function assertStatic($test_id, $test_class, $status, $message = '', $group = 'Other', array $caller = NULL) {
+  public static function insertAssert($test_id, $test_class, $status, $message = '', $group = 'Other', array $caller = NULL) {
     // Convert boolean status to string status.
     if (is_bool($status)) {
       $status = $status ? 'pass' : 'fail';
