Skip to content

Commit 252be50

Browse files
No effects for no store
1 parent 1cef068 commit 252be50

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/Symfony/Component/HttpKernel/Tests/EventListener/CacheAttributeListenerTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -102,18 +102,18 @@ public function testResponseIsPublicIfConfigurationIsPublicTrueNoStoreFalse()
102102
$this->assertFalse($this->response->headers->hasCacheControlDirective('no-store'));
103103
}
104104

105-
public function testResponseIsPrivateIfConfigurationIsPublicTrueNoStoreTrue()
105+
public function testResponseKeepPublicIfConfigurationIsPublicTrueNoStoreTrue()
106106
{
107107
$request = $this->createRequest(new Cache(public: true, noStore: true));
108108

109109
$this->listener->onKernelResponse($this->createEventMock($request, $this->response));
110110

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'));
113113
$this->assertTrue($this->response->headers->hasCacheControlDirective('no-store'));
114114
}
115115

116-
public function testResponseIsPrivateNoStoreIfConfigurationIsNoStoreTrue()
116+
public function testResponseHasNothingNoStoreIfConfigurationIsNoStoreTrue()
117117
{
118118
$request = $this->createRequest(new Cache(noStore: true));
119119

@@ -124,14 +124,14 @@ public function testResponseIsPrivateNoStoreIfConfigurationIsNoStoreTrue()
124124
$this->assertTrue($this->response->headers->hasCacheControlDirective('no-store'));
125125
}
126126

127-
public function testResponseIsPrivateIfSharedMaxAgeSetAndNoStoreIsTrue()
127+
public function testResponseIsPublicIfSharedMaxAgeSetAndNoStoreIsTrue()
128128
{
129129
$request = $this->createRequest(new Cache(smaxage: 1, noStore: true));
130130

131131
$this->listener->onKernelResponse($this->createEventMock($request, $this->response));
132132

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'));
135135
$this->assertTrue($this->response->headers->hasCacheControlDirective('no-store'));
136136
}
137137

0 commit comments

Comments
 (0)