@@ -654,7 +654,7 @@ public function testAssignsDefaultTtlWhenResponseHasNoFreshnessInformation()
654
654
$ this ->assertTraceContains ('miss ' );
655
655
$ this ->assertTraceContains ('store ' );
656
656
$ this ->assertEquals ('Hello World ' , $ this ->response ->getContent ());
657
- $ this ->assertRegExp ('/s-maxage=10/ ' , $ this ->response ->headers ->get ('Cache-Control ' ));
657
+ $ this ->assertMatchesRegularExpression ('/s-maxage=10/ ' , $ this ->response ->headers ->get ('Cache-Control ' ));
658
658
659
659
$ this ->cacheConfig ['default_ttl ' ] = 10 ;
660
660
$ this ->request ('GET ' , '/ ' );
@@ -663,7 +663,7 @@ public function testAssignsDefaultTtlWhenResponseHasNoFreshnessInformation()
663
663
$ this ->assertTraceContains ('fresh ' );
664
664
$ this ->assertTraceNotContains ('store ' );
665
665
$ this ->assertEquals ('Hello World ' , $ this ->response ->getContent ());
666
- $ this ->assertRegExp ('/s-maxage=10/ ' , $ this ->response ->headers ->get ('Cache-Control ' ));
666
+ $ this ->assertMatchesRegularExpression ('/s-maxage=10/ ' , $ this ->response ->headers ->get ('Cache-Control ' ));
667
667
}
668
668
669
669
public function testAssignsDefaultTtlWhenResponseHasNoFreshnessInformationAndAfterTtlWasExpired ()
@@ -676,15 +676,15 @@ public function testAssignsDefaultTtlWhenResponseHasNoFreshnessInformationAndAft
676
676
$ this ->assertTraceContains ('miss ' );
677
677
$ this ->assertTraceContains ('store ' );
678
678
$ this ->assertEquals ('Hello World ' , $ this ->response ->getContent ());
679
- $ this ->assertRegExp ('/s-maxage=(2|3)/ ' , $ this ->response ->headers ->get ('Cache-Control ' ));
679
+ $ this ->assertMatchesRegularExpression ('/s-maxage=(2|3)/ ' , $ this ->response ->headers ->get ('Cache-Control ' ));
680
680
681
681
$ this ->request ('GET ' , '/ ' );
682
682
$ this ->assertHttpKernelIsNotCalled ();
683
683
$ this ->assertEquals (200 , $ this ->response ->getStatusCode ());
684
684
$ this ->assertTraceContains ('fresh ' );
685
685
$ this ->assertTraceNotContains ('store ' );
686
686
$ this ->assertEquals ('Hello World ' , $ this ->response ->getContent ());
687
- $ this ->assertRegExp ('/s-maxage=(2|3)/ ' , $ this ->response ->headers ->get ('Cache-Control ' ));
687
+ $ this ->assertMatchesRegularExpression ('/s-maxage=(2|3)/ ' , $ this ->response ->headers ->get ('Cache-Control ' ));
688
688
689
689
// expires the cache
690
690
$ values = $ this ->getMetaStorageValues ();
@@ -704,7 +704,7 @@ public function testAssignsDefaultTtlWhenResponseHasNoFreshnessInformationAndAft
704
704
$ this ->assertTraceContains ('invalid ' );
705
705
$ this ->assertTraceContains ('store ' );
706
706
$ this ->assertEquals ('Hello World ' , $ this ->response ->getContent ());
707
- $ this ->assertRegExp ('/s-maxage=(2|3)/ ' , $ this ->response ->headers ->get ('Cache-Control ' ));
707
+ $ this ->assertMatchesRegularExpression ('/s-maxage=(2|3)/ ' , $ this ->response ->headers ->get ('Cache-Control ' ));
708
708
709
709
$ this ->setNextResponse ();
710
710
@@ -714,7 +714,7 @@ public function testAssignsDefaultTtlWhenResponseHasNoFreshnessInformationAndAft
714
714
$ this ->assertTraceContains ('fresh ' );
715
715
$ this ->assertTraceNotContains ('store ' );
716
716
$ this ->assertEquals ('Hello World ' , $ this ->response ->getContent ());
717
- $ this ->assertRegExp ('/s-maxage=(2|3)/ ' , $ this ->response ->headers ->get ('Cache-Control ' ));
717
+ $ this ->assertMatchesRegularExpression ('/s-maxage=(2|3)/ ' , $ this ->response ->headers ->get ('Cache-Control ' ));
718
718
}
719
719
720
720
public function testAssignsDefaultTtlWhenResponseHasNoFreshnessInformationAndAfterTtlWasExpiredWithStatus304 ()
@@ -727,7 +727,7 @@ public function testAssignsDefaultTtlWhenResponseHasNoFreshnessInformationAndAft
727
727
$ this ->assertTraceContains ('miss ' );
728
728
$ this ->assertTraceContains ('store ' );
729
729
$ this ->assertEquals ('Hello World ' , $ this ->response ->getContent ());
730
- $ this ->assertRegExp ('/s-maxage=(2|3)/ ' , $ this ->response ->headers ->get ('Cache-Control ' ));
730
+ $ this ->assertMatchesRegularExpression ('/s-maxage=(2|3)/ ' , $ this ->response ->headers ->get ('Cache-Control ' ));
731
731
732
732
$ this ->request ('GET ' , '/ ' );
733
733
$ this ->assertHttpKernelIsNotCalled ();
@@ -755,15 +755,15 @@ public function testAssignsDefaultTtlWhenResponseHasNoFreshnessInformationAndAft
755
755
$ this ->assertTraceContains ('store ' );
756
756
$ this ->assertTraceNotContains ('miss ' );
757
757
$ this ->assertEquals ('Hello World ' , $ this ->response ->getContent ());
758
- $ this ->assertRegExp ('/s-maxage=(2|3)/ ' , $ this ->response ->headers ->get ('Cache-Control ' ));
758
+ $ this ->assertMatchesRegularExpression ('/s-maxage=(2|3)/ ' , $ this ->response ->headers ->get ('Cache-Control ' ));
759
759
760
760
$ this ->request ('GET ' , '/ ' );
761
761
$ this ->assertHttpKernelIsNotCalled ();
762
762
$ this ->assertEquals (200 , $ this ->response ->getStatusCode ());
763
763
$ this ->assertTraceContains ('fresh ' );
764
764
$ this ->assertTraceNotContains ('store ' );
765
765
$ this ->assertEquals ('Hello World ' , $ this ->response ->getContent ());
766
- $ this ->assertRegExp ('/s-maxage=(2|3)/ ' , $ this ->response ->headers ->get ('Cache-Control ' ));
766
+ $ this ->assertMatchesRegularExpression ('/s-maxage=(2|3)/ ' , $ this ->response ->headers ->get ('Cache-Control ' ));
767
767
}
768
768
769
769
public function testDoesNotAssignDefaultTtlWhenResponseHasMustRevalidateDirective ()
@@ -776,7 +776,7 @@ public function testDoesNotAssignDefaultTtlWhenResponseHasMustRevalidateDirectiv
776
776
$ this ->assertEquals (200 , $ this ->response ->getStatusCode ());
777
777
$ this ->assertTraceContains ('miss ' );
778
778
$ this ->assertTraceNotContains ('store ' );
779
- $ this ->assertNotRegExp ('/s-maxage/ ' , $ this ->response ->headers ->get ('Cache-Control ' ));
779
+ $ this ->assertDoesNotMatchRegularExpression ('/s-maxage/ ' , $ this ->response ->headers ->get ('Cache-Control ' ));
780
780
$ this ->assertEquals ('Hello World ' , $ this ->response ->getContent ());
781
781
}
782
782
0 commit comments