Index: modules/simpletest/tests/bootstrap.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/tests/bootstrap.test,v
retrieving revision 1.26
diff -u -p -r1.26 bootstrap.test
--- modules/simpletest/tests/bootstrap.test	21 Nov 2009 14:35:05 -0000	1.26
+++ modules/simpletest/tests/bootstrap.test	24 Dec 2009 08:25:27 -0000
@@ -413,3 +413,30 @@ class BootstrapResettableStaticTestCase 
     $this->assertEqual($var, 'foo', t('Variable was reset after second invocation of global reset.'));
   }
 }
+
+/**
+ * Test that drupal_get_bootstrap_phase() returns the current bootstrap phase.
+ */
+class BootstrapPhaseTestCase extends DrupalWebTestCase {
+
+  public static function getInfo() {
+    return array(
+      'name' => 'Bootstrap phase',
+      'description' => 'Tests that drupal_bootstrap_phase() returns the current phase .',
+      'group' => 'Bootstrap',
+    );
+  }
+
+  function setUp() {
+    parent::setUp('system_test');
+  }
+
+  /**
+   * Confirm that calling drupal_bootstrap_phase() during hook_init()
+   * returns DRUPAL_BOOTSTRAP_FULL
+   */
+  function testDrupalBootstrapPhase() {
+    $this->drupalGet('');
+    $this->assertText(t('Current bootstrap phase is @phase', array('@phase' => DRUPAL_BOOTSTRAP_FULL)), t('Bootstrap phase is returned correctly.'));
+  }
+}
Index: modules/simpletest/tests/system_test.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/tests/system_test.module,v
retrieving revision 1.23
diff -u -p -r1.23 system_test.module
--- modules/simpletest/tests/system_test.module	8 Dec 2009 06:39:34 -0000	1.23
+++ modules/simpletest/tests/system_test.module	24 Dec 2009 08:25:27 -0000
@@ -225,6 +225,8 @@ function system_test_init() {
   if (variable_get('front_page_output', 0) && drupal_is_front_page()) {
     drupal_set_message(t('On front page.'));
   }
+
+  drupal_set_message(t('Current bootstrap phase is @phase', array('@phase' => drupal_get_bootstrap_phase())));
 }
 
 /**
