diff --git a/core/modules/basic_auth/src/Tests/Authentication/BasicAuthTest.php b/core/modules/basic_auth/src/Tests/Authentication/BasicAuthTest.php index 0b27b8a..fcc2239 100644 --- a/core/modules/basic_auth/src/Tests/Authentication/BasicAuthTest.php +++ b/core/modules/basic_auth/src/Tests/Authentication/BasicAuthTest.php @@ -24,7 +24,7 @@ class BasicAuthTest extends WebTestBase { * * @var array */ - public static $modules = array('basic_auth', 'router_test', 'locale', 'page_cache'); + public static $modules = array('basic_auth', 'router_test', 'locale'); /** * Test http basic authentication. diff --git a/core/modules/block/src/Tests/BlockTest.php b/core/modules/block/src/Tests/BlockTest.php index c3defb5..d6e0999 100644 --- a/core/modules/block/src/Tests/BlockTest.php +++ b/core/modules/block/src/Tests/BlockTest.php @@ -20,11 +20,6 @@ class BlockTest extends BlockTestBase { /** - * {@inheritdoc} - */ - protected static $modules = ['page_cache']; - - /** * Tests block visibility. */ function testBlockVisibility() { diff --git a/core/modules/page_cache/src/Tests/PageCacheTest.php b/core/modules/page_cache/src/Tests/PageCacheTest.php index f445920..88fc30f 100644 --- a/core/modules/page_cache/src/Tests/PageCacheTest.php +++ b/core/modules/page_cache/src/Tests/PageCacheTest.php @@ -35,6 +35,9 @@ class PageCacheTest extends WebTestBase { */ public static $modules = array('test_page_test', 'system_test', 'page_cache'); + /** + * {@inheritdoc} + */ protected function setUp() { parent::setUp(); @@ -42,20 +45,6 @@ protected function setUp() { ->set('name', 'Drupal') ->set('page.front', 'test-page') ->save(); - - $config = $this->config('system.performance'); - $config->set('cache.page.max_age', 300); - $config->save(); - - // As the DefaultRequestPolicy deny cache for CLI requests, - // build request policy without CLI check. - $this->container->set('page_cache_request_policy', NULL); - /** @var \Drupal\Core\Session\SessionConfigurationInterface $session_configuration */ - $session_configuration = $this->container->get('session_configuration'); - /** @var \Drupal\Core\PageCache\RequestPolicyInterface $request_policy */ - $request_policy = new ChainRequestPolicy(); - $request_policy->addPolicy(new NoSessionOpen($session_configuration)); - $this->container->set('page_cache_request_policy', $request_policy); } /** @@ -64,7 +53,7 @@ protected function setUp() { * Since tag based invalidation works, we know that our tag properly * persisted. */ - function testPageCacheTags() { + public function testPageCacheTags() { $path = 'system-test/cache_tags_page'; $tags = array('system_test_cache_tags_page'); $this->drupalGet($path); @@ -73,7 +62,7 @@ function testPageCacheTags() { // Verify a cache hit, but also the presence of the correct cache tags. $this->drupalGet($path); $this->assertEqual($this->drupalGetHeader('X-Drupal-Cache'), 'HIT'); - $cid_parts = array(\Drupal::url('system_test.cache_tags_page', array(), array('absolute' => TRUE)), 'html'); + $cid_parts = array(\Drupal::url('system_test.cache_tags_page',array(), array('absolute' => TRUE)), 'html'); $cid = implode(':', $cid_parts); $cache_entry = \Drupal::cache('render')->get($cid); sort($cache_entry->tags); @@ -92,7 +81,7 @@ function testPageCacheTags() { /** * Tests support for different cache items with different Accept headers. */ - function testAcceptHeaderRequests() { + public function testAcceptHeaderRequests() { $url_generator = \Drupal::urlGenerator(); $url_generator->setContext(new RequestContext()); $accept_header_cache_uri = $url_generator->getPathFromRoute('system_test.page_cache_accept_header'); @@ -158,7 +147,7 @@ function testAcceptHeaderRequests() { /** * Tests support of requests with If-Modified-Since and If-None-Match headers. */ - function testConditionalRequests() { + public function testConditionalRequests() { // Fill the cache. $this->drupalGet(''); // Verify the page is not printed twice when the cache is cold. @@ -198,7 +187,7 @@ function testConditionalRequests() { /** * Tests cache headers. */ - function testPageCache() { + public function testPageCache() { // Fill the cache. $this->drupalGet('system-test/set-header', array('query' => array('name' => 'Foo', 'value' => 'bar'))); $this->assertEqual($this->drupalGetHeader('X-Drupal-Cache'), 'MISS', 'Page was not cached.'); @@ -250,7 +239,7 @@ function testPageCache() { * This test verifies that, and it verifies that it does not happen for other * roles. */ - function testPageCacheAnonymousRolePermissions() { + public function testPageCacheAnonymousRolePermissions() { $config = $this->config('system.performance'); $config->set('cache.page.max_age', 300); $config->save(); diff --git a/core/modules/system/src/Tests/Ajax/AjaxFormPageCacheTest.php b/core/modules/system/src/Tests/Ajax/AjaxFormPageCacheTest.php index b9f9a28..c5dafbe 100644 --- a/core/modules/system/src/Tests/Ajax/AjaxFormPageCacheTest.php +++ b/core/modules/system/src/Tests/Ajax/AjaxFormPageCacheTest.php @@ -17,11 +17,6 @@ class AjaxFormPageCacheTest extends AjaxTestBase { /** * {@inheritdoc} */ - public static $modules = ['page_cache']; - - /** - * {@inheritdoc} - */ public function setUp() { parent::setUp(); diff --git a/core/modules/system/src/Tests/Cache/PageCacheTagsTestBase.php b/core/modules/system/src/Tests/Cache/PageCacheTagsTestBase.php index a718e08..b4f40bd 100644 --- a/core/modules/system/src/Tests/Cache/PageCacheTagsTestBase.php +++ b/core/modules/system/src/Tests/Cache/PageCacheTagsTestBase.php @@ -26,11 +26,6 @@ /** * {@inheritdoc} */ - protected static $modules = ['page_cache']; - - /** - * {@inheritdoc} - */ protected function setUp() { parent::setUp(); diff --git a/core/modules/system/src/Tests/Form/FormStoragePageCacheTest.php b/core/modules/system/src/Tests/Form/FormStoragePageCacheTest.php index bac12db..5fa8c34 100644 --- a/core/modules/system/src/Tests/Form/FormStoragePageCacheTest.php +++ b/core/modules/system/src/Tests/Form/FormStoragePageCacheTest.php @@ -19,7 +19,7 @@ class FormStoragePageCacheTest extends WebTestBase { /** * @var array */ - public static $modules = array('form_test', 'page_cache'); + public static $modules = array('form_test'); /** * {@inheritdoc}