Commit d805f522 authored by catch's avatar catch

Issue #578400 by aaronschachter, melsi, Gábor Hojtsy, valthebald, idflood,...

Issue #578400 by aaronschachter, melsi, Gábor Hojtsy, valthebald, idflood, sign, Damien Tournoud: Fixed Display the page title, even if 0.
parent 5e58da00
...@@ -66,5 +66,17 @@ function testNodeTitle() { ...@@ -66,5 +66,17 @@ function testNodeTitle() {
// Test node title is clickable on teaser list (/node). // Test node title is clickable on teaser list (/node).
$this->drupalGet('node'); $this->drupalGet('node');
$this->clickLink($node->label()); $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');
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment