Make fragile test less fragile.

This commit is contained in:
mark_story 2012-11-01 21:36:14 -04:00
parent ddd3baf703
commit 118dd8c534

View file

@ -132,11 +132,14 @@ class MediaViewTest extends CakeTestCase {
$this->MediaView->response->expects($this->at(1)) $this->MediaView->response->expects($this->at(1))
->method('header') ->method('header')
->with(array( ->with($this->logicalAnd(
'Date' => gmdate('D, d M Y H:i:s', time()) . ' GMT', $this->arrayHasKey('Date'),
'Expires' => '0', $this->arrayHasKey('Expires'),
'Cache-Control' => 'private, must-revalidate, post-check=0, pre-check=0', $this->arrayHasKey('Cache-Control'),
'Pragma' => 'no-cache' $this->arrayHasKey('Pragma'),
$this->contains('0'),
$this->contains('private, must-revalidate, post-check=0, pre-check=0'),
$this->contains('no-cache')
)); ));
$this->MediaView->response->expects($this->once()) $this->MediaView->response->expects($this->once())