diff --git a/core/modules/book/src/Tests/BookInstallTest.php b/core/modules/book/src/Tests/BookInstallTest.php deleted file mode 100644 index ba70a9b..0000000 --- a/core/modules/book/src/Tests/BookInstallTest.php +++ /dev/null @@ -1,48 +0,0 @@ -drupalCreateContentType(['type' => 'book']); - - // Install the Book module. - try { - $this->container->get('module_installer')->install(['book']); - } - catch (PreExistingConfigException $e) { - $this->fail("Expected exception thrown trying to install Book module: " . $e->getMessage()); - } - } - -} diff --git a/core/modules/book/src/Tests/BookBreadcrumbTest.php b/core/modules/book/tests/src/Functional/BookBreadcrumbTest.php similarity index 95% rename from core/modules/book/src/Tests/BookBreadcrumbTest.php rename to core/modules/book/tests/src/Functional/BookBreadcrumbTest.php index 57e1b3d..69c0d62 100644 --- a/core/modules/book/src/Tests/BookBreadcrumbTest.php +++ b/core/modules/book/tests/src/Functional/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/tests/src/Functional/BookTest.php similarity index 99% rename from core/modules/book/src/Tests/BookTest.php rename to core/modules/book/tests/src/Functional/BookTest.php index cdd61c6..e56fc31 100644 --- a/core/modules/book/src/Tests/BookTest.php +++ b/core/modules/book/tests/src/Functional/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($elements[0]->getText(), 'View', 'View link is found from the list.'); } /**