mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Updating testcase and fixing small bug in last commit
This commit is contained in:
parent
6f5ce8a81d
commit
0ba5023f3a
3 changed files with 7 additions and 9 deletions
|
@ -616,7 +616,7 @@ class CakeResponse {
|
|||
$this->header(array(
|
||||
'Date' => gmdate("D, j M Y G:i:s ", $since) . 'GMT',
|
||||
'Expires' => gmdate("D, j M Y H:i:s", $time) . " GMT",
|
||||
'Cache-Control' => 'public, max-age=' . $time - time(),
|
||||
'Cache-Control' => 'public, max-age=' . ($time - time()),
|
||||
'Pragma' => 'cache'
|
||||
));
|
||||
}
|
||||
|
|
|
@ -21,8 +21,6 @@ App::import('View', 'View', false);
|
|||
|
||||
class MediaView extends View {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
|
|
|
@ -229,9 +229,9 @@ class CakeResponseTestCase extends CakeTestCase {
|
|||
$since = time();
|
||||
$time = '+1 day';
|
||||
$expected = array(
|
||||
'Date' => date("D, j M Y G:i:s ", $since) . 'GMT',
|
||||
'Date' => gmdate("D, j M Y G:i:s ", $since) . 'GMT',
|
||||
'Expires' => gmdate("D, j M Y H:i:s", strtotime($time)) . " GMT",
|
||||
'Cache-Control' => 'cache',
|
||||
'Cache-Control' => 'public, max-age=' . (strtotime($time) - time()),
|
||||
'Pragma' => 'cache'
|
||||
);
|
||||
$response->cache($since);
|
||||
|
@ -241,9 +241,9 @@ class CakeResponseTestCase extends CakeTestCase {
|
|||
$since = time();
|
||||
$time = '+5 day';
|
||||
$expected = array(
|
||||
'Date' => date("D, j M Y G:i:s ", $since) . 'GMT',
|
||||
'Date' => gmdate("D, j M Y G:i:s ", $since) . 'GMT',
|
||||
'Expires' => gmdate("D, j M Y H:i:s", strtotime($time)) . " GMT",
|
||||
'Cache-Control' => 'cache',
|
||||
'Cache-Control' => 'public, max-age=' . (strtotime($time) - time()),
|
||||
'Pragma' => 'cache'
|
||||
);
|
||||
$response->cache($since, $time);
|
||||
|
@ -253,9 +253,9 @@ class CakeResponseTestCase extends CakeTestCase {
|
|||
$since = time();
|
||||
$time = time();
|
||||
$expected = array(
|
||||
'Date' => date("D, j M Y G:i:s ", $since) . 'GMT',
|
||||
'Date' => gmdate("D, j M Y G:i:s ", $since) . 'GMT',
|
||||
'Expires' => gmdate("D, j M Y H:i:s", $time) . " GMT",
|
||||
'Cache-Control' => 'cache',
|
||||
'Cache-Control' => 'public, max-age=0',
|
||||
'Pragma' => 'cache'
|
||||
);
|
||||
$response->cache($since, $time);
|
||||
|
|
Loading…
Reference in a new issue