Loading core/modules/book/tests/src/Functional/BookBreadcrumbTest.php +5 −5 Original line number Diff line number Diff line Loading @@ -21,7 +21,7 @@ class BookBreadcrumbTest extends BrowserTestBase { /** * {@inheritdoc} */ protected $defaultTheme = 'classy'; protected $defaultTheme = 'stark'; /** * A book node. Loading Loading @@ -156,7 +156,7 @@ public function testBreadcrumbTitleUpdates() { $this->drupalGet($nodes[4]->toUrl()); // Fetch each node title in the current breadcrumb. $links = $this->xpath('//nav[@class="breadcrumb"]/ol/li/a'); $links = $this->xpath('//nav[@aria-labelledby="system-breadcrumb"]/ol/li/a'); $got_breadcrumb = []; foreach ($links as $link) { $got_breadcrumb[] = $link->getText(); Loading @@ -171,7 +171,7 @@ public function testBreadcrumbTitleUpdates() { $this->submitForm($edit, 'Save'); $this->drupalGet($nodes[4]->toUrl()); // Fetch each node title in the current breadcrumb. $links = $this->xpath('//nav[@class="breadcrumb"]/ol/li/a'); $links = $this->xpath('//nav[@aria-labelledby="system-breadcrumb"]/ol/li/a'); $got_breadcrumb = []; foreach ($links as $link) { $got_breadcrumb[] = $link->getText(); Loading @@ -193,7 +193,7 @@ public function testBreadcrumbAccessUpdates() { $this->drupalGet($nodes[3]->toUrl('edit-form')); $this->submitForm($edit, 'Save'); $this->drupalGet($nodes[4]->toUrl()); $links = $this->xpath('//nav[@class="breadcrumb"]/ol/li/a'); $links = $this->xpath('//nav[@aria-labelledby="system-breadcrumb"]/ol/li/a'); $got_breadcrumb = []; foreach ($links as $link) { $got_breadcrumb[] = $link->getText(); Loading @@ -203,7 +203,7 @@ public function testBreadcrumbAccessUpdates() { $config = $this->container->get('config.factory')->getEditable('book_breadcrumb_test.settings'); $config->set('hide', TRUE)->save(); $this->drupalGet($nodes[4]->toUrl()); $links = $this->xpath('//nav[@class="breadcrumb"]/ol/li/a'); $links = $this->xpath('//nav[@aria-labelledby="system-breadcrumb"]/ol/li/a'); $got_breadcrumb = []; foreach ($links as $link) { $got_breadcrumb[] = $link->getText(); Loading core/modules/book/tests/src/Functional/BookContentModerationTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -30,7 +30,7 @@ class BookContentModerationTest extends BrowserTestBase { /** * {@inheritdoc} */ protected $defaultTheme = 'classy'; protected $defaultTheme = 'stark'; /** * {@inheritdoc} Loading core/modules/book/tests/src/Functional/BookTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -31,7 +31,7 @@ class BookTest extends BrowserTestBase { /** * {@inheritdoc} */ protected $defaultTheme = 'classy'; protected $defaultTheme = 'stark'; /** * A user with permission to view a book and access printer-friendly version. Loading core/modules/book/tests/src/Functional/BookTestTrait.php +2 −4 Original line number Diff line number Diff line Loading @@ -92,7 +92,6 @@ public function checkBookNode(EntityInterface $node, $nodes, $previous, $up, $ne // since it uniquely identifies each call to checkBookNode(). static $number = 0; $this->drupalGet('node/' . $node->id()); // Check outline structure. if ($nodes !== NULL) { $this->assertSession()->responseMatches($this->generateOutlinePattern($nodes)); Loading Loading @@ -130,7 +129,7 @@ public function checkBookNode(EntityInterface $node, $nodes, $previous, $up, $ne } // Fetch links in the current breadcrumb. $links = $this->xpath('//nav[@class="breadcrumb"]/ol/li/a'); $links = $this->xpath('//nav[@aria-labelledby="system-breadcrumb"]/ol/li/a'); $got_breadcrumb = []; foreach ($links as $link) { $got_breadcrumb[] = $link->getAttribute('href'); Loading Loading @@ -161,8 +160,7 @@ public function generateOutlinePattern($nodes) { foreach ($nodes as $node) { $outline .= '(node\/' . $node->id() . ')(.*?)(' . $node->label() . ')(.*?)'; } return '/<nav id="book-navigation-' . $this->book->id() . '"(.*?)<ul(.*?)' . $outline . '<\/ul>/s'; return '/<nav role="navigation" aria-labelledby="book-label-' . $this->book->id() . '"(.*?)<ul(.*?)' . $outline . '<\/ul>/s'; } /** Loading Loading
core/modules/book/tests/src/Functional/BookBreadcrumbTest.php +5 −5 Original line number Diff line number Diff line Loading @@ -21,7 +21,7 @@ class BookBreadcrumbTest extends BrowserTestBase { /** * {@inheritdoc} */ protected $defaultTheme = 'classy'; protected $defaultTheme = 'stark'; /** * A book node. Loading Loading @@ -156,7 +156,7 @@ public function testBreadcrumbTitleUpdates() { $this->drupalGet($nodes[4]->toUrl()); // Fetch each node title in the current breadcrumb. $links = $this->xpath('//nav[@class="breadcrumb"]/ol/li/a'); $links = $this->xpath('//nav[@aria-labelledby="system-breadcrumb"]/ol/li/a'); $got_breadcrumb = []; foreach ($links as $link) { $got_breadcrumb[] = $link->getText(); Loading @@ -171,7 +171,7 @@ public function testBreadcrumbTitleUpdates() { $this->submitForm($edit, 'Save'); $this->drupalGet($nodes[4]->toUrl()); // Fetch each node title in the current breadcrumb. $links = $this->xpath('//nav[@class="breadcrumb"]/ol/li/a'); $links = $this->xpath('//nav[@aria-labelledby="system-breadcrumb"]/ol/li/a'); $got_breadcrumb = []; foreach ($links as $link) { $got_breadcrumb[] = $link->getText(); Loading @@ -193,7 +193,7 @@ public function testBreadcrumbAccessUpdates() { $this->drupalGet($nodes[3]->toUrl('edit-form')); $this->submitForm($edit, 'Save'); $this->drupalGet($nodes[4]->toUrl()); $links = $this->xpath('//nav[@class="breadcrumb"]/ol/li/a'); $links = $this->xpath('//nav[@aria-labelledby="system-breadcrumb"]/ol/li/a'); $got_breadcrumb = []; foreach ($links as $link) { $got_breadcrumb[] = $link->getText(); Loading @@ -203,7 +203,7 @@ public function testBreadcrumbAccessUpdates() { $config = $this->container->get('config.factory')->getEditable('book_breadcrumb_test.settings'); $config->set('hide', TRUE)->save(); $this->drupalGet($nodes[4]->toUrl()); $links = $this->xpath('//nav[@class="breadcrumb"]/ol/li/a'); $links = $this->xpath('//nav[@aria-labelledby="system-breadcrumb"]/ol/li/a'); $got_breadcrumb = []; foreach ($links as $link) { $got_breadcrumb[] = $link->getText(); Loading
core/modules/book/tests/src/Functional/BookContentModerationTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -30,7 +30,7 @@ class BookContentModerationTest extends BrowserTestBase { /** * {@inheritdoc} */ protected $defaultTheme = 'classy'; protected $defaultTheme = 'stark'; /** * {@inheritdoc} Loading
core/modules/book/tests/src/Functional/BookTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -31,7 +31,7 @@ class BookTest extends BrowserTestBase { /** * {@inheritdoc} */ protected $defaultTheme = 'classy'; protected $defaultTheme = 'stark'; /** * A user with permission to view a book and access printer-friendly version. Loading
core/modules/book/tests/src/Functional/BookTestTrait.php +2 −4 Original line number Diff line number Diff line Loading @@ -92,7 +92,6 @@ public function checkBookNode(EntityInterface $node, $nodes, $previous, $up, $ne // since it uniquely identifies each call to checkBookNode(). static $number = 0; $this->drupalGet('node/' . $node->id()); // Check outline structure. if ($nodes !== NULL) { $this->assertSession()->responseMatches($this->generateOutlinePattern($nodes)); Loading Loading @@ -130,7 +129,7 @@ public function checkBookNode(EntityInterface $node, $nodes, $previous, $up, $ne } // Fetch links in the current breadcrumb. $links = $this->xpath('//nav[@class="breadcrumb"]/ol/li/a'); $links = $this->xpath('//nav[@aria-labelledby="system-breadcrumb"]/ol/li/a'); $got_breadcrumb = []; foreach ($links as $link) { $got_breadcrumb[] = $link->getAttribute('href'); Loading Loading @@ -161,8 +160,7 @@ public function generateOutlinePattern($nodes) { foreach ($nodes as $node) { $outline .= '(node\/' . $node->id() . ')(.*?)(' . $node->label() . ')(.*?)'; } return '/<nav id="book-navigation-' . $this->book->id() . '"(.*?)<ul(.*?)' . $outline . '<\/ul>/s'; return '/<nav role="navigation" aria-labelledby="book-label-' . $this->book->id() . '"(.*?)<ul(.*?)' . $outline . '<\/ul>/s'; } /** Loading