From 118dd8c534b6d8be0f45352577f6967ca63a8249 Mon Sep 17 00:00:00 2001 From: mark_story Date: Thu, 1 Nov 2012 21:36:14 -0400 Subject: [PATCH] Make fragile test less fragile. --- lib/Cake/Test/Case/View/MediaViewTest.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/Cake/Test/Case/View/MediaViewTest.php b/lib/Cake/Test/Case/View/MediaViewTest.php index 3b723c0bf..8660a119b 100644 --- a/lib/Cake/Test/Case/View/MediaViewTest.php +++ b/lib/Cake/Test/Case/View/MediaViewTest.php @@ -132,11 +132,14 @@ class MediaViewTest extends CakeTestCase { $this->MediaView->response->expects($this->at(1)) ->method('header') - ->with(array( - 'Date' => gmdate('D, d M Y H:i:s', time()) . ' GMT', - 'Expires' => '0', - 'Cache-Control' => 'private, must-revalidate, post-check=0, pre-check=0', - 'Pragma' => 'no-cache' + ->with($this->logicalAnd( + $this->arrayHasKey('Date'), + $this->arrayHasKey('Expires'), + $this->arrayHasKey('Cache-Control'), + $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())