summaryrefslogtreecommitdiffstats
path: root/core/modules/node/src/Tests/NodeTitleTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/node/src/Tests/NodeTitleTest.php')
-rw-r--r--core/modules/node/src/Tests/NodeTitleTest.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/modules/node/src/Tests/NodeTitleTest.php b/core/modules/node/src/Tests/NodeTitleTest.php
index 9b503ff..784125c 100644
--- a/core/modules/node/src/Tests/NodeTitleTest.php
+++ b/core/modules/node/src/Tests/NodeTitleTest.php
@@ -42,7 +42,8 @@ class NodeTitleTest extends NodeTestBase {
*/
function testNodeTitle() {
// Create "Basic page" content with title.
- // Add the node to the frontpage so we can test if teaser links are clickable.
+ // Add the node to the frontpage so we can test if teaser links are
+ // clickable.
$settings = array(
'title' => $this->randomName(8),
'promote' => 1,
@@ -60,7 +61,7 @@ class NodeTitleTest extends NodeTestBase {
$this->assertEqual(current($this->xpath($xpath)), $node->label(), 'Node breadcrumb is equal to node title.', 'Node');
// Test node title in comment preview.
- $this->assertEqual(current($this->xpath('//article[@id=:id]/h2/a/span', array(':id' => 'node-' . $node->id()))), $node->label(), 'Node preview title is equal to node title.', 'Node');
+ $this->assertEqual(current($this->xpath('//article[contains(concat(" ", normalize-space(@class), " "), :node-class)]/h2/a/span', array(':node-class' => ' node--type-' . $node->bundle() . ' '))), $node->label(), 'Node preview title is equal to node title.', 'Node');
// Test node title is clickable on teaser list (/node).
$this->drupalGet('node');