@@ -102,18 +102,18 @@ public function testResponseIsPublicIfConfigurationIsPublicTrueNoStoreFalse()
102
102
$ this ->assertFalse ($ this ->response ->headers ->hasCacheControlDirective ('no-store ' ));
103
103
}
104
104
105
- public function testResponseIsPrivateIfConfigurationIsPublicTrueNoStoreTrue ()
105
+ public function testResponseKeepPublicIfConfigurationIsPublicTrueNoStoreTrue ()
106
106
{
107
107
$ request = $ this ->createRequest (new Cache (public: true , noStore: true ));
108
108
109
109
$ this ->listener ->onKernelResponse ($ this ->createEventMock ($ request , $ this ->response ));
110
110
111
- $ this ->assertFalse ($ this ->response ->headers ->hasCacheControlDirective ('public ' ));
112
- $ this ->assertTrue ($ this ->response ->headers ->hasCacheControlDirective ('private ' ));
111
+ $ this ->assertTrue ($ this ->response ->headers ->hasCacheControlDirective ('public ' ));
112
+ $ this ->assertFalse ($ this ->response ->headers ->hasCacheControlDirective ('private ' ));
113
113
$ this ->assertTrue ($ this ->response ->headers ->hasCacheControlDirective ('no-store ' ));
114
114
}
115
115
116
- public function testResponseIsPrivateNoStoreIfConfigurationIsNoStoreTrue ()
116
+ public function testResponseKeepPrivateNoStoreIfConfigurationIsNoStoreTrue ()
117
117
{
118
118
$ request = $ this ->createRequest (new Cache (noStore: true ));
119
119
@@ -124,14 +124,14 @@ public function testResponseIsPrivateNoStoreIfConfigurationIsNoStoreTrue()
124
124
$ this ->assertTrue ($ this ->response ->headers ->hasCacheControlDirective ('no-store ' ));
125
125
}
126
126
127
- public function testResponseIsPrivateIfSharedMaxAgeSetAndNoStoreIsTrue ()
127
+ public function testResponseIsPublicIfSharedMaxAgeSetAndNoStoreIsTrue ()
128
128
{
129
129
$ request = $ this ->createRequest (new Cache (smaxage: 1 , noStore: true ));
130
130
131
131
$ this ->listener ->onKernelResponse ($ this ->createEventMock ($ request , $ this ->response ));
132
132
133
- $ this ->assertFalse ($ this ->response ->headers ->hasCacheControlDirective ('public ' ));
134
- $ this ->assertTrue ($ this ->response ->headers ->hasCacheControlDirective ('private ' ));
133
+ $ this ->assertTrue ($ this ->response ->headers ->hasCacheControlDirective ('public ' ));
134
+ $ this ->assertFalse ($ this ->response ->headers ->hasCacheControlDirective ('private ' ));
135
135
$ this ->assertTrue ($ this ->response ->headers ->hasCacheControlDirective ('no-store ' ));
136
136
}
137
137
0 commit comments