diff --git a/core/modules/book/src/Tests/BookBreadcrumbTest.php b/core/modules/book/src/Tests/BookBreadcrumbTest.php index 57e1b3d..69c0d62 100644 --- a/core/modules/book/src/Tests/BookBreadcrumbTest.php +++ b/core/modules/book/src/Tests/BookBreadcrumbTest.php @@ -1,15 +1,15 @@ xpath('//nav[@class="breadcrumb"]/ol/li/a'); $got_breadcrumb = array(); foreach ($links as $link) { - $got_breadcrumb[] = (string) $link; + $got_breadcrumb[] = $link->getText(); } // Home link and four parent book nodes should be in the breadcrumb. $this->assertEqual(5, count($got_breadcrumb)); @@ -162,7 +162,7 @@ public function testBreadcrumbTitleUpdates() { $links = $this->xpath('//nav[@class="breadcrumb"]/ol/li/a'); $got_breadcrumb = array(); foreach ($links as $link) { - $got_breadcrumb[] = (string) $link; + $got_breadcrumb[] = $link->getText(); } $this->assertEqual(5, count($got_breadcrumb)); $this->assertEqual($edit['title[0][value]'], end($got_breadcrumb)); @@ -183,7 +183,7 @@ public function testBreadcrumbAccessUpdates() { $links = $this->xpath('//nav[@class="breadcrumb"]/ol/li/a'); $got_breadcrumb = array(); foreach ($links as $link) { - $got_breadcrumb[] = (string) $link; + $got_breadcrumb[] = $link->getText(); } $this->assertEqual(5, count($got_breadcrumb)); $this->assertEqual($edit['title[0][value]'], end($got_breadcrumb)); @@ -193,7 +193,7 @@ public function testBreadcrumbAccessUpdates() { $links = $this->xpath('//nav[@class="breadcrumb"]/ol/li/a'); $got_breadcrumb = array(); foreach ($links as $link) { - $got_breadcrumb[] = (string) $link; + $got_breadcrumb[] = $link->getText(); } $this->assertEqual(4, count($got_breadcrumb)); $this->assertEqual($nodes[2]->getTitle(), end($got_breadcrumb)); diff --git a/core/modules/book/src/Tests/BookTest.php b/core/modules/book/src/Tests/BookTest.php index cdd61c6..270908f 100644 --- a/core/modules/book/src/Tests/BookTest.php +++ b/core/modules/book/src/Tests/BookTest.php @@ -1,11 +1,11 @@ xpath('//nav[@class="breadcrumb"]/ol/li/a'); $got_breadcrumb = array(); foreach ($links as $link) { - $got_breadcrumb[] = (string) $link['href']; + $got_breadcrumb[] = $link->getAttribute('href'); } // Compare expected and got breadcrumbs. @@ -690,7 +690,7 @@ public function testAdminBookNodeListing() { $this->assertText($this->book->label(), 'The book title is displayed on the administrative book listing page.'); $elements = $this->xpath('//table//ul[@class="dropbutton"]/li/a'); - $this->assertEqual((string) $elements[0], 'View', 'View link is found from the list.'); + $this->assertEqual((string) $elements[0]->getText(), 'View', 'View link is found from the list.'); } /**