Index: modules/simpletest/tests/theme.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/tests/theme.test,v
retrieving revision 1.16
diff -u -p -r1.16 theme.test
--- modules/simpletest/tests/theme.test	29 Apr 2010 05:22:06 -0000	1.16
+++ modules/simpletest/tests/theme.test	25 Jun 2010 08:53:39 -0000
@@ -182,3 +182,31 @@ class ThemeHookInitUnitTest extends Drup
     $this->assertRaw('garland/style.css', t("The default theme's CSS appears on the page when the theme system is initialized in hook_init()."));
   }
 }
+
+/**
+ * Functional test for initialization of the theme system in hook_init().
+ */
+class ThemeTitleUnitTest extends DrupalWebTestCase {
+  public static function getInfo() {
+    return array(
+      'name' => 'Theme title test',
+      'description' => 'Tests that the theme displays the title as set.',
+      'group' => 'Theme',
+    );
+  }
+
+  function setUp() {
+    parent::setUp();
+    $web_user = $this->drupalCreateUser(array('create article content'));
+    $this->drupalLogin($web_user);
+  }
+
+  /**
+   * Create four nodes and ensure they're loaded correctly.
+   */
+  function testZeroTitle() {
+    $node = $this->drupalCreateNode(array('type' => 'article', 'title' => '0'));
+    $this->drupalGet('node/' . $node->nid);
+    $this->assertRaw('>0</h1>', t('Theme displayed title when set to 0.'));
+  }
+}
