diff --git a/core/modules/book/book.module b/core/modules/book/book.module index e80b5e3..355fd02 100644 --- a/core/modules/book/book.module +++ b/core/modules/book/book.module @@ -468,7 +468,9 @@ function template_preprocess_book_export_html(&$variables) { $variables['base_url'] = $base_url; $variables['language'] = $language_interface; $variables['language_rtl'] = ($language_interface->getDirection() == LanguageInterface::DIRECTION_RTL); - $variables['head'] = drupal_get_html_head(); + // @todo: Commenting out the following line is wrong. + // @see https://www.drupal.org/node/2477223 +// $variables['head'] = drupal_get_html_head(); // HTML element attributes. $attributes = array(); diff --git a/core/modules/system/src/Tests/Common/AddFeedTest.php b/core/modules/system/src/Tests/Common/AddFeedTest.php index a83f41b..7ec728e 100644 --- a/core/modules/system/src/Tests/Common/AddFeedTest.php +++ b/core/modules/system/src/Tests/Common/AddFeedTest.php @@ -61,9 +61,15 @@ function testBasicFeedAddNoTitle() { $build['#attached']['feed'][] = [$feed_info['url'], $feed_info['title']]; } - drupal_process_attached($build); + // Use the bare HTML page renderer to render our links. + $renderer = $this->container->get('bare_html_page_renderer'); + $response = $renderer->renderBarePage( + $build, '', $this->container->get('theme.manager')->getActiveTheme()->getName() + ); - $this->setRawContent(drupal_get_html_head()); + // Glean the content from the response object. + $this->setRawContent($response->getContent()); + // Assert that the content contains the RSS links we specified. foreach ($urls as $description => $feed_info) { $this->assertPattern($this->urlToRSSLinkPattern($feed_info['url'], $feed_info['title']), format_string('Found correct feed header for %description', array('%description' => $description))); }