diff --git a/core/modules/page_cache/tests/src/Functional/PageCacheTest.php b/core/modules/page_cache/src/Tests/PageCacheTest.php similarity index 98% rename from core/modules/page_cache/tests/src/Functional/PageCacheTest.php rename to core/modules/page_cache/src/Tests/PageCacheTest.php index f2c43f5261..3ef1f58772 100644 --- a/core/modules/page_cache/tests/src/Functional/PageCacheTest.php +++ b/core/modules/page_cache/src/Tests/PageCacheTest.php @@ -1,13 +1,13 @@ setContainerParameter('http.response.debug_cacheability_headers', FALSE); - $this->rebuildContainer(); - $this->resetAll(); + $this->setHttpResponseDebugCacheabilityHeaders(FALSE); $path = 'system-test/cache_tags_page'; $tags = ['system_test_cache_tags_page']; diff --git a/core/modules/page_cache/tests/src/Functional/PageCacheTagsIntegrationTest.php b/core/modules/page_cache/tests/src/Functional/PageCacheTagsIntegrationTest.php index fc27a1b64c..00a28d4a5d 100644 --- a/core/modules/page_cache/tests/src/Functional/PageCacheTagsIntegrationTest.php +++ b/core/modules/page_cache/tests/src/Functional/PageCacheTagsIntegrationTest.php @@ -12,7 +12,7 @@ * Enables the page cache and tests its cache tags in various scenarios. * * @group Cache - * @see \Drupal\Tests\page_cache\Functional\PageCacheTest + * @see \Drupal\page_cache\Tests\PageCacheTest * @see \Drupal\node\Tests\NodePageCacheTest * @see \Drupal\menu_ui\Tests\MenuTest::testMenuBlockPageCacheTags() */ diff --git a/core/tests/Drupal/Tests/BrowserTestBase.php b/core/tests/Drupal/Tests/BrowserTestBase.php index 9c8bbcdb7c..bd50c23b48 100644 --- a/core/tests/Drupal/Tests/BrowserTestBase.php +++ b/core/tests/Drupal/Tests/BrowserTestBase.php @@ -1419,44 +1419,4 @@ protected function checkForMetaRefresh() { return FALSE; } - /** - * Retrieves only the headers for a Drupal path or an absolute path. - * - * @param $path - * Drupal path or URL to load into internal browser - * @param $options - * Options to be forwarded to the url generator. - * @param $headers - * An array containing additional HTTP request headers, each formatted as - * "name: value". - * - * @return - * The retrieved headers, also available as $this->getRawContent() - */ - protected function drupalHead($path, array $options = [], array $headers = []) { - $options['absolute'] = TRUE; - $url = $this->buildUrl($path, $options); - $session = $this->getSession(); - $this->prepareRequest(); - foreach ($headers as $header_name => $header_value) { - $session->setRequestHeader($header_name, $header_value); - } - $session->visit($url); - $out = $session->getResponseHeaders(); - - // Ensure that any changes to variables in the other thread are picked up. - $this->refreshVariables(); - - // Log only for JavascriptTestBase tests because for Goutte we log with - // ::getResponseLogHandler. - if ($this->htmlOutputEnabled && !($this->getSession()->getDriver() instanceof GoutteDriver)) { - $html_output = 'GET request to: ' . $url . - '
Ending URL: ' . $this->getSession()->getCurrentUrl(); - $html_output .= '
' . $out; - $html_output .= $this->getHtmlOutputHeaders(); - $this->htmlOutput($html_output); - } - return $out; - } - }