summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathaniel Catchpole2014-06-26 11:24:32 (GMT)
committerNathaniel Catchpole2014-06-26 11:24:32 (GMT)
commitd805f5227819a40caadae644d585cfecf4580ac8 (patch)
tree2ec84017603fb746db033df7c62aeb971a949551
parent5e58da00e6472598de73b9156daa935aa2743910 (diff)
Issue #578400 by aaronschachter, melsi, Gábor Hojtsy, valthebald, idflood, sign, Damien Tournoud: Fixed Display the page title, even if 0.
-rw-r--r--core/modules/node/src/Tests/NodeTitleTest.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/core/modules/node/src/Tests/NodeTitleTest.php b/core/modules/node/src/Tests/NodeTitleTest.php
index 784125c..c117745 100644
--- a/core/modules/node/src/Tests/NodeTitleTest.php
+++ b/core/modules/node/src/Tests/NodeTitleTest.php
@@ -66,5 +66,17 @@ class NodeTitleTest extends NodeTestBase {
// Test node title is clickable on teaser list (/node).
$this->drupalGet('node');
$this->clickLink($node->label());
+
+ // Test edge case where node title is set to 0.
+ $settings = array(
+ 'title' => 0,
+ );
+ $node = $this->drupalCreateNode($settings);
+ // Test that 0 appears as <title>.
+ $this->drupalGet('node/' . $node->id());
+ $this->assertTitle(0 . ' | Drupal', 'Page title is equal to 0.', 'Node');
+ // Test that 0 appears in the template <h1>.
+ $xpath = '//h1';
+ $this->assertEqual(current($this->xpath($xpath)), 0, 'Node title is displayed as 0.', 'Node');
}
}