Skip to content

Commit 1441707

Browse files
committed
Issue #2668416 by Krzysztof Domański, wheatpenny, Lendude, alexpott: Wrong assert in NodeTitleTest
(cherry picked from commit 751b384)
1 parent b46a1e1 commit 1441707

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

modules/node/tests/src/Functional/NodeTitleTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ class NodeTitleTest extends NodeTestBase {
3434
protected function setUp() {
3535
parent::setUp();
3636
$this->drupalPlaceBlock('system_breadcrumb_block');
37+
$this->drupalPlaceBlock('page_title_block');
3738

3839
$this->adminUser = $this->drupalCreateUser(['administer nodes', 'create article content', 'create page content', 'post comments']);
3940
$this->drupalLogin($this->adminUser);
@@ -80,7 +81,7 @@ public function testNodeTitle() {
8081
$this->assertTitle(0 . ' | Drupal', 'Page title is equal to 0.', 'Node');
8182
// Test that 0 appears in the template <h1>.
8283
$xpath = '//h1';
83-
$this->assertEqual(current($this->xpath($xpath)), 0, 'Node title is displayed as 0.', 'Node');
84+
$this->assertSame('0', $this->xpath($xpath)[0]->getText(), 'Node title is displayed as 0.');
8485

8586
// Test edge case where node title contains special characters.
8687
$edge_case_title = 'article\'s "title".';

0 commit comments

Comments
 (0)