summaryrefslogtreecommitdiffstats
path: root/core/modules/node/src
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/node/src')
-rw-r--r--core/modules/node/src/Tests/NodeFieldMultilingualTestCase.php6
-rw-r--r--core/modules/node/src/Tests/NodePostSettingsTest.php4
-rw-r--r--core/modules/node/src/Tests/NodeTitleTest.php5
3 files changed, 8 insertions, 7 deletions
diff --git a/core/modules/node/src/Tests/NodeFieldMultilingualTestCase.php b/core/modules/node/src/Tests/NodeFieldMultilingualTestCase.php
index fd83b93..42dfafb 100644
--- a/core/modules/node/src/Tests/NodeFieldMultilingualTestCase.php
+++ b/core/modules/node/src/Tests/NodeFieldMultilingualTestCase.php
@@ -133,9 +133,9 @@ class NodeFieldMultilingualTestCase extends WebTestBase {
// Check if node body is showed.
$this->drupalGet('node/' . $node->id());
- $body = $this->xpath('//article[@id=:id]//div[@class=:class]/descendant::p', array(
- ':id' => 'node-' . $node->id(),
- ':class' => 'content',
+ $body = $this->xpath('//article[contains(concat(" ", normalize-space(@class), " "), :node-class)]//div[contains(concat(" ", normalize-space(@class), " "), :content-class)]/descendant::p', array(
+ ':node-class' => ' node ',
+ ':content-class' => 'node__content',
));
$this->assertEqual(current($body), $node->body->value, 'Node body found.');
}
diff --git a/core/modules/node/src/Tests/NodePostSettingsTest.php b/core/modules/node/src/Tests/NodePostSettingsTest.php
index a7478a8..7cfaa7e 100644
--- a/core/modules/node/src/Tests/NodePostSettingsTest.php
+++ b/core/modules/node/src/Tests/NodePostSettingsTest.php
@@ -45,7 +45,7 @@ class NodePostSettingsTest extends NodeTestBase {
// Check that the post information is displayed.
$node = $this->drupalGetNodeByTitle($edit['title[0][value]']);
- $elements = $this->xpath('//*[contains(@class,:class)]', array(':class' => 'submitted'));
+ $elements = $this->xpath('//div[contains(@class, :class)]', array(':class' => 'node__submitted'));
$this->assertEqual(count($elements), 1, 'Post information is displayed.');
$node->delete();
@@ -61,7 +61,7 @@ class NodePostSettingsTest extends NodeTestBase {
$this->drupalPostForm('node/add/page', $edit, t('Save'));
// Check that the post information is displayed.
- $elements = $this->xpath('//*[contains(@class,:class)]', array(':class' => 'submitted'));
+ $elements = $this->xpath('//div[contains(@class, :class)]', array(':class' => 'node__submitted'));
$this->assertEqual(count($elements), 0, 'Post information is not displayed.');
}
}
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');