Loading core/modules/page_cache/tests/src/Functional/PageCacheTest.php +5 −5 Original line number Diff line number Diff line Loading @@ -247,7 +247,7 @@ public function testPageCache() { // Fill the cache. $this->drupalGet('system-test/set-header', ['query' => ['name' => 'Foo', 'value' => 'bar']]); $this->assertEqual($this->drupalGetHeader('X-Drupal-Cache'), 'MISS', 'Page was not cached.'); $this->assertContains('cookie', explode(',', strtolower($this->drupalGetHeader('Vary'))), 'Vary header was sent.', TRUE); $this->assertContains('cookie', explode(',', strtolower($this->drupalGetHeader('Vary'))), 'Vary header was sent.'); // Symfony's Response logic determines a specific order for the subvalues // of the Cache-Control header, even if they are explicitly passed in to // the response header bag in a different order. Loading @@ -258,7 +258,7 @@ public function testPageCache() { // Check cache. $this->drupalGet('system-test/set-header', ['query' => ['name' => 'Foo', 'value' => 'bar']]); $this->assertEqual($this->drupalGetHeader('X-Drupal-Cache'), 'HIT', 'Page was cached.'); $this->assertContains('cookie', explode(',', strtolower($this->drupalGetHeader('Vary'))), 'Vary header was sent.', TRUE); $this->assertContains('cookie', explode(',', strtolower($this->drupalGetHeader('Vary'))), 'Vary header was sent.'); $this->assertEqual($this->drupalGetHeader('Cache-Control'), 'max-age=300, public', 'Cache-Control header was sent.'); $this->assertEqual($this->drupalGetHeader('Expires'), 'Sun, 19 Nov 1978 05:00:00 GMT', 'Expires header was sent.'); $this->assertEqual($this->drupalGetHeader('Foo'), 'bar', 'Custom header was sent.'); Loading @@ -274,7 +274,7 @@ public function testPageCache() { $this->drupalLogin($user); $this->drupalGet('system-test/set-header', ['query' => ['name' => 'Foo', 'value' => 'bar']]); $this->assertNull($this->drupalGetHeader('X-Drupal-Cache'), 'Caching was bypassed.'); $this->assertStringNotContainsString('cookie', $this->drupalGetHeader('Vary'), 'Vary: Cookie header was not sent.', TRUE); $this->assertStringNotContainsStringIgnoringCase('cookie', $this->drupalGetHeader('Vary'), 'Vary: Cookie header was not sent.'); $this->assertEqual($this->drupalGetHeader('Cache-Control'), 'must-revalidate, no-cache, private', 'Cache-Control header was sent.'); $this->assertEqual($this->drupalGetHeader('Expires'), 'Sun, 19 Nov 1978 05:00:00 GMT', 'Expires header was sent.'); $this->assertEqual($this->drupalGetHeader('Foo'), 'bar', 'Custom header was sent.'); Loading Loading @@ -441,13 +441,13 @@ public function testPageCacheWithoutVaryCookie() { // Fill the cache. $this->drupalGet(''); $this->assertEqual($this->drupalGetHeader('X-Drupal-Cache'), 'MISS', 'Page was not cached.'); $this->assertStringNotContainsString('cookie', $this->drupalGetHeader('Vary'), 'Vary: Cookie header was not sent.', TRUE); $this->assertStringNotContainsStringIgnoringCase('cookie', $this->drupalGetHeader('Vary'), 'Vary: Cookie header was not sent.'); $this->assertEqual($this->drupalGetHeader('Cache-Control'), 'max-age=300, public', 'Cache-Control header was sent.'); // Check cache. $this->drupalGet(''); $this->assertEqual($this->drupalGetHeader('X-Drupal-Cache'), 'HIT', 'Page was cached.'); $this->assertStringNotContainsString('cookie', $this->drupalGetHeader('Vary'), 'Vary: Cookie header was not sent.', TRUE); $this->assertStringNotContainsStringIgnoringCase('cookie', $this->drupalGetHeader('Vary'), 'Vary: Cookie header was not sent.'); $this->assertEqual($this->drupalGetHeader('Cache-Control'), 'max-age=300, public', 'Cache-Control header was sent.'); } Loading core/tests/Drupal/Tests/Traits/PHPUnit8Warnings.php +0 −2 Original line number Diff line number Diff line Loading @@ -28,8 +28,6 @@ trait PHPUnit8Warnings { 'getObjectAttribute() is deprecated and will be removed in PHPUnit 9.', 'assertAttributeEquals() is deprecated and will be removed in PHPUnit 9.', 'assertAttributeInstanceOf() is deprecated and will be removed in PHPUnit 9.', 'The optional $ignoreCase parameter of assertContains() is deprecated and will be removed in PHPUnit 9.', 'The optional $ignoreCase parameter of assertNotContains() is deprecated and will be removed in PHPUnit 9.', ]; /** Loading Loading
core/modules/page_cache/tests/src/Functional/PageCacheTest.php +5 −5 Original line number Diff line number Diff line Loading @@ -247,7 +247,7 @@ public function testPageCache() { // Fill the cache. $this->drupalGet('system-test/set-header', ['query' => ['name' => 'Foo', 'value' => 'bar']]); $this->assertEqual($this->drupalGetHeader('X-Drupal-Cache'), 'MISS', 'Page was not cached.'); $this->assertContains('cookie', explode(',', strtolower($this->drupalGetHeader('Vary'))), 'Vary header was sent.', TRUE); $this->assertContains('cookie', explode(',', strtolower($this->drupalGetHeader('Vary'))), 'Vary header was sent.'); // Symfony's Response logic determines a specific order for the subvalues // of the Cache-Control header, even if they are explicitly passed in to // the response header bag in a different order. Loading @@ -258,7 +258,7 @@ public function testPageCache() { // Check cache. $this->drupalGet('system-test/set-header', ['query' => ['name' => 'Foo', 'value' => 'bar']]); $this->assertEqual($this->drupalGetHeader('X-Drupal-Cache'), 'HIT', 'Page was cached.'); $this->assertContains('cookie', explode(',', strtolower($this->drupalGetHeader('Vary'))), 'Vary header was sent.', TRUE); $this->assertContains('cookie', explode(',', strtolower($this->drupalGetHeader('Vary'))), 'Vary header was sent.'); $this->assertEqual($this->drupalGetHeader('Cache-Control'), 'max-age=300, public', 'Cache-Control header was sent.'); $this->assertEqual($this->drupalGetHeader('Expires'), 'Sun, 19 Nov 1978 05:00:00 GMT', 'Expires header was sent.'); $this->assertEqual($this->drupalGetHeader('Foo'), 'bar', 'Custom header was sent.'); Loading @@ -274,7 +274,7 @@ public function testPageCache() { $this->drupalLogin($user); $this->drupalGet('system-test/set-header', ['query' => ['name' => 'Foo', 'value' => 'bar']]); $this->assertNull($this->drupalGetHeader('X-Drupal-Cache'), 'Caching was bypassed.'); $this->assertStringNotContainsString('cookie', $this->drupalGetHeader('Vary'), 'Vary: Cookie header was not sent.', TRUE); $this->assertStringNotContainsStringIgnoringCase('cookie', $this->drupalGetHeader('Vary'), 'Vary: Cookie header was not sent.'); $this->assertEqual($this->drupalGetHeader('Cache-Control'), 'must-revalidate, no-cache, private', 'Cache-Control header was sent.'); $this->assertEqual($this->drupalGetHeader('Expires'), 'Sun, 19 Nov 1978 05:00:00 GMT', 'Expires header was sent.'); $this->assertEqual($this->drupalGetHeader('Foo'), 'bar', 'Custom header was sent.'); Loading Loading @@ -441,13 +441,13 @@ public function testPageCacheWithoutVaryCookie() { // Fill the cache. $this->drupalGet(''); $this->assertEqual($this->drupalGetHeader('X-Drupal-Cache'), 'MISS', 'Page was not cached.'); $this->assertStringNotContainsString('cookie', $this->drupalGetHeader('Vary'), 'Vary: Cookie header was not sent.', TRUE); $this->assertStringNotContainsStringIgnoringCase('cookie', $this->drupalGetHeader('Vary'), 'Vary: Cookie header was not sent.'); $this->assertEqual($this->drupalGetHeader('Cache-Control'), 'max-age=300, public', 'Cache-Control header was sent.'); // Check cache. $this->drupalGet(''); $this->assertEqual($this->drupalGetHeader('X-Drupal-Cache'), 'HIT', 'Page was cached.'); $this->assertStringNotContainsString('cookie', $this->drupalGetHeader('Vary'), 'Vary: Cookie header was not sent.', TRUE); $this->assertStringNotContainsStringIgnoringCase('cookie', $this->drupalGetHeader('Vary'), 'Vary: Cookie header was not sent.'); $this->assertEqual($this->drupalGetHeader('Cache-Control'), 'max-age=300, public', 'Cache-Control header was sent.'); } Loading
core/tests/Drupal/Tests/Traits/PHPUnit8Warnings.php +0 −2 Original line number Diff line number Diff line Loading @@ -28,8 +28,6 @@ trait PHPUnit8Warnings { 'getObjectAttribute() is deprecated and will be removed in PHPUnit 9.', 'assertAttributeEquals() is deprecated and will be removed in PHPUnit 9.', 'assertAttributeInstanceOf() is deprecated and will be removed in PHPUnit 9.', 'The optional $ignoreCase parameter of assertContains() is deprecated and will be removed in PHPUnit 9.', 'The optional $ignoreCase parameter of assertNotContains() is deprecated and will be removed in PHPUnit 9.', ]; /** Loading