10000 Fix s-maxage=3 transient test · symfony/symfony@f019b52 · GitHub
[go: up one dir, main page]

Skip to content

Commit f019b52

Browse files
committed
Fix s-maxage=3 transient test
1 parent e95b8a3 commit f019b52

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/Symfony/Component/HttpKernel/Tests/HttpCache/HttpCacheTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -660,15 +660,15 @@ public function testAssignsDefaultTtlWhenResponseHasNoFreshnessInformationAndAft
660660
$this->assertTraceContains('miss');
661661
$this->assertTraceContains('store');
662662
$this->assertEquals('Hello World', $this->response->getContent());
663-
$this->assertRegExp('/s-maxage=2/', $this->response->headers->get('Cache-Control'));
663+
$this->assertRegExp('/s-maxage=(2|3)/', $this->response->headers->get('Cache-Control'));
664664

665665
$this->request('GET', '/');
666666
$this->assertHttpKernelIsNotCalled();
667667
$this->assertEquals(200, $this->response->getStatusCode());
668668
$this->assertTraceContains('fresh');
669669
$this->assertTraceNotContains('store');
670670
$this->assertEquals('Hello World', $this->response->getContent());
671-
$this->assertRegExp('/s-maxage=2/', $this->response->headers->get('Cache-Control'));
671+
$this->assertRegExp('/s-maxage=(2|3)/', $this->response->headers->get('Cache-Control'));
672672

673673
// expires the cache
674674
$values = $this->getMetaStorageValues();
@@ -688,7 +688,7 @@ public function testAssignsDefaultTtlWhenResponseHasNoFreshnessInformationAndAft
688688
$this->assertTraceContains('invalid');
689689
$this->assertTraceContains('store');
690690
$this->assertEquals('Hello World', $this->response->getContent());
691-
$this->assertRegExp('/s-maxage=2/', $this->response->headers->get('Cache-Control'));
691+
$this->assertRegExp('/s-maxage=(2|3)/', $this->response->headers->get('Cache-Control'));
692692

693693
$this->setNextResponse();
694694

@@ -698,7 +698,7 @@ public function testAssignsDefaultTtlWhenResponseHasNoFreshnessInformationAndAft
698698
$this->assertTraceContains('fresh');
699699
$this->assertTraceNotContains('store');
700700
$this->assertEquals('Hello World', $this->response->getContent());
701-
$this->assertRegExp('/s-maxage=2/', $this->response->headers->get('Cache-Control'));
701+
$this->assertRegExp('/s-maxage=(2|3)/', $this->response->headers->get('Cache-Control'));
702702
}
703703

704704
public function testAssignsDefaultTtlWhenResponseHasNoFreshnessInformationAndAfterTtlWasExpiredWithStatus304()
@@ -711,7 +711,7 @@ public function testAssignsDefaultTtlWhenResponseHasNoFreshnessInformationAndAft
711711
$this->assertTraceContains('miss');
712712
$this->assertTraceContains('store');
713713
$this->assertEquals('Hello World', $this->response->getContent());
714-
$this->assertRegExp('/s-maxage=2/', $this->response->headers->get('Cache-Control'));
714+
$this->assertRegExp('/s-maxage=(2|3)/', $this->response->headers->get('Cache-Control'));
715715

716716
$this->request('GET', '/');
717717
$this->assertHttpKernelIsNotCalled();
@@ -739,15 +739,15 @@ public function testAssignsDefaultTtlWhenResponseHasNoFreshnessInformationAndAft
739739
$this->assertTraceContains('store');
740740
$this->assertTraceNotContains('miss');
741741
$this->assertEquals('Hello World', $this->response->getContent());
742-
$this->assertRegExp('/s-maxage=2/', $this->response->headers->get('Cache-Control'));
742+
$this->assertRegExp('/s-maxage=(2|3)/', $this->response->headers->get('Cache-Control'));
743743

744744
$this->request('GET', '/');
745745
$this->assertHttpKernelIsNotCalled();
746746
$this->assertEquals(200, $this->response->getStatusCode());
747747
$this->assertTraceContains('fresh');
748748
$this->assertTraceNotContains('store');
749749
$this->assertEquals('Hello World', $this->response->getContent());
750-
$this->assertRegExp('/s-maxage=2/', $this->response->headers->get('Cache-Control'));
750+
$this->assertRegExp('/s-maxage=(2|3)/', $this->response->headers->get('Cache-Control'));
751751
}
752752

753753
public function testDoesNotAssignDefaultTtlWhenResponseHasMustRevalidateDirective()

0 commit comments

Comments
 (0)
0