diff core/modules/node/tests/src/Functional/NodeTitleTest.php @ 17:129ea1e6d783

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:21:36 +0000
parents 4c8ae668cc8c
children
line wrap: on
line diff
--- a/core/modules/node/tests/src/Functional/NodeTitleTest.php	Tue Jul 10 15:07:59 2018 +0100
+++ b/core/modules/node/tests/src/Functional/NodeTitleTest.php	Thu Feb 28 13:21:36 2019 +0000
@@ -34,6 +34,7 @@
   protected function setUp() {
     parent::setUp();
     $this->drupalPlaceBlock('system_breadcrumb_block');
+    $this->drupalPlaceBlock('page_title_block');
 
     $this->adminUser = $this->drupalCreateUser(['administer nodes', 'create article content', 'create page content', 'post comments']);
     $this->drupalLogin($this->adminUser);
@@ -80,7 +81,7 @@
     $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');
+    $this->assertSame('0', $this->xpath($xpath)[0]->getText(), 'Node title is displayed as 0.');
 
     // Test edge case where node title contains special characters.
     $edge_case_title = 'article\'s "title".';