From 4f559f5cc954438662bf9a8f030f3ec19dc23a3a Mon Sep 17 00:00:00 2001 From: Costa Caruso Date: Thu, 3 Jul 2014 15:03:48 -0400 Subject: [PATCH] Fixed failing test for CakeResponse::sharable + spacing --- lib/Cake/Network/CakeResponse.php | 1 + lib/Cake/Test/Case/Network/CakeResponseTest.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Cake/Network/CakeResponse.php b/lib/Cake/Network/CakeResponse.php index 21a69c0e2..47d0e2e3c 100644 --- a/lib/Cake/Network/CakeResponse.php +++ b/lib/Cake/Network/CakeResponse.php @@ -838,6 +838,7 @@ class CakeResponse { $this->_cacheDirectives['private'] = true; unset($this->_cacheDirectives['public']); } + $this->maxAge($time); if (!$time) { $this->_setCacheControl(); diff --git a/lib/Cake/Test/Case/Network/CakeResponseTest.php b/lib/Cake/Test/Case/Network/CakeResponseTest.php index 59504de14..cb6ee2d73 100644 --- a/lib/Cake/Test/Case/Network/CakeResponseTest.php +++ b/lib/Cake/Test/Case/Network/CakeResponseTest.php @@ -751,7 +751,7 @@ class CakeResponseTest extends CakeTestCase { $response = new CakeResponse; $response->sharable(true, 3600); $headers = $response->header(); - $this->assertEquals('public, s-maxage=3600', $headers['Cache-Control']); + $this->assertEquals('public, max-age=3600', $headers['Cache-Control']); $response = new CakeResponse; $response->sharable(false, 3600);