@@ -660,15 +660,15 @@ public function testAssignsDefaultTtlWhenResponseHasNoFreshnessInformationAndAft
660
660
$ this ->assertTraceContains ('miss ' );
661
661
$ this ->assertTraceContains ('store ' );
662
662
$ 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 ' ));
664
664
665
665
$ this ->request ('GET ' , '/ ' );
666
666
$ this ->assertHttpKernelIsNotCalled ();
667
667
$ this ->assertEquals (200 , $ this ->response ->getStatusCode ());
668
668
$ this ->assertTraceContains ('fresh ' );
669
669
$ this ->assertTraceNotContains ('store ' );
670
670
$ 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 ' ));
672
672
673
673
// expires the cache
674
674
$ values = $ this ->getMetaStorageValues ();
@@ -688,7 +688,7 @@ public function testAssignsDefaultTtlWhenResponseHasNoFreshnessInformationAndAft
688
688
$ this ->assertTraceContains ('invalid ' );
689
689
$ this ->assertTraceContains ('store ' );
690
690
$ 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 ' ));
692
692
693
693
$ this ->setNextResponse ();
694
694
@@ -698,7 +698,7 @@ public function testAssignsDefaultTtlWhenResponseHasNoFreshnessInformationAndAft
698
698
$ this ->assertTraceContains ('fresh ' );
699
699
$ this ->assertTraceNotContains ('store ' );
700
700
$ 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 ' ));
702
702
}
703
703
704
704
public function testAssignsDefaultTtlWhenResponseHasNoFreshnessInformationAndAfterTtlWasExpiredWithStatus304 ()
@@ -711,7 +711,7 @@ public function testAssignsDefaultTtlWhenResponseHasNoFreshnessInformationAndAft
711
711
$ this ->assertTraceContains ('miss ' );
712
712
$ this ->assertTraceContains ('store ' );
713
713
$ 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 ' ));
715
715
716
716
$ this ->request ('GET ' , '/ ' );
717
717
$ this ->assertHttpKernelIsNotCalled ();
@@ -739,15 +739,15 @@ public function testAssignsDefaultTtlWhenResponseHasNoFreshnessInformationAndAft
739
739
$ this ->assertTraceContains ('store ' );
740
740
$ this ->assertTraceNotContains ('miss ' );
741
741
$ 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 ' ));
743
743
744
744
$ this ->request ('GET ' , '/ ' );
745
745
$ this ->assertHttpKernelIsNotCalled ();
746
746
$ this ->assertEquals (200 , $ this ->response ->getStatusCode ());
747
747
$ this ->assertTraceContains ('fresh ' );
748
748
$ this ->assertTraceNotContains ('store ' );
749
749
$ 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 ' ));
751
751
}
752
752
753
753
public function testDoesNotAssignDefaultTtlWhenResponseHasMustRevalidateDirective ()
0 commit comments