@@ 12-20 (lines=9) @@ | ||
9 | class HeadersBuilderTest extends TestCase |
|
10 | { |
|
11 | ||
12 | public function testSetResponseHeadersPublic() |
|
13 | { |
|
14 | $builder = new HeadersBuilder(); |
|
15 | $response = new Response(); |
|
16 | ||
17 | $builder->setResponseHeaders($response, 'xml', new \DateTime()); |
|
18 | $this->assertTrue($response->headers->getCacheControlDirective('public')); |
|
19 | $this->assertEquals(3600, $response->getMaxAge()); |
|
20 | } |
|
21 | ||
22 | public function testSetResponseHeadersPrivate() |
|
23 | { |
|
@@ 22-30 (lines=9) @@ | ||
19 | $this->assertEquals(3600, $response->getMaxAge()); |
|
20 | } |
|
21 | ||
22 | public function testSetResponseHeadersPrivate() |
|
23 | { |
|
24 | $builder = new HeadersBuilder(false, 30); |
|
25 | $response = new Response(); |
|
26 | ||
27 | $builder->setResponseHeaders($response, 'xml', new \DateTime()); |
|
28 | $this->assertTrue($response->headers->getCacheControlDirective('private')); |
|
29 | $this->assertEquals(30, $response->getMaxAge()); |
|
30 | } |
|
31 | ||
32 | public function testSetLastModified() |
|
33 | { |