You are here

protected function WebTestBase::setHttpResponseDebugCacheabilityHeaders in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/simpletest/src/WebTestBase.php \Drupal\simpletest\WebTestBase::setHttpResponseDebugCacheabilityHeaders()

Enables/disables the cacheability headers.

Sets the http.response.debug_cacheability_headers container parameter.

Parameters

bool $value: (optional) Whether the debugging cacheability headers should be sent.

2 calls to WebTestBase::setHttpResponseDebugCacheabilityHeaders()
PageCacheTest::testPageCacheTagsIndependentFromCacheabilityHeaders in core/modules/page_cache/src/Tests/PageCacheTest.php
Test that the page cache doesn't depend on cacheability headers.
RouterTest::testFinishResponseSubscriber in core/modules/system/src/Tests/Routing/RouterTest.php
Confirms that our FinishResponseSubscriber logic works properly.

File

core/modules/simpletest/src/WebTestBase.php, line 3045
Contains \Drupal\simpletest\WebTestBase.

Class

WebTestBase
Test case for typical Drupal tests.

Namespace

Drupal\simpletest

Code

protected function setHttpResponseDebugCacheabilityHeaders($value = TRUE) {
  $this
    ->setContainerParameter('http.response.debug_cacheability_headers', $value);
  $this
    ->rebuildContainer();
  $this
    ->resetAll();
}