13 public function testForFile()
15 $content =
'1234567890';
16 $files = array(
'file.css',
'file.jpg');
18 $fullPath = Yii::app()->getModule(
'contentSource')->sourceSettings[
'DynamicContentSource'][
'cacheFolder'] . $path;
22 $this->assertTrue(in_array(
'Content-Type: text/css', $headers));
23 $this->assertTrue(in_array(
'Content-Length: 10', $headers));
26 $fullPath = Yii::app()->getModule(
'contentSource')->sourceSettings[
'DynamicContentSource'][
'cacheFolder'] . $path;
29 $this->assertTrue(in_array(
'Content-Type: image/jpeg', $headers));
32 public function testExpires()
36 $this->assertTrue(in_array(
'Pragma: public', $headers));
37 $this->assertTrue(in_array(
"Expires: " . date(
"r", time() + $seconds), $headers));
40 public function testCache()
45 $this->assertTrue(in_array(
'Cache-Control: max-age=' . $seconds .
', public', $headers));