From 7985746190a7736458333a3ec3fb530d1e0a684d Mon Sep 17 00:00:00 2001 From: DarkAngelBGE Date: Mon, 5 May 2008 17:54:05 +0000 Subject: [PATCH] fixing failing timehelper tests (isThisWeek()) git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6764 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/tests/cases/libs/view/helpers/time.test.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cake/tests/cases/libs/view/helpers/time.test.php b/cake/tests/cases/libs/view/helpers/time.test.php index 4cc54add4..ea8154a1e 100644 --- a/cake/tests/cases/libs/view/helpers/time.test.php +++ b/cake/tests/cases/libs/view/helpers/time.test.php @@ -382,35 +382,35 @@ class TimeTest extends UnitTestCase { $this->assertFalse($this->Time->isThisWeek("-2 days")); break; case 'Wed' : - for ($i = -2; $i < 4; $i++) { + for ($i = -2; $i < 5; $i++) { $this->assertTrue($this->Time->isThisWeek("+$i days")); } $this->assertFalse($this->Time->isThisWeek("+5 days")); $this->assertFalse($this->Time->isThisWeek("-3 days")); break; case 'Thu' : - for ($i = -3; $i < 3; $i++) { + for ($i = -3; $i < 4; $i++) { $this->assertTrue($this->Time->isThisWeek("+$i days")); } $this->assertFalse($this->Time->isThisWeek("+4 days")); $this->assertFalse($this->Time->isThisWeek("-4 days")); break; case 'Fri' : - for ($i = -4; $i < 2; $i++) { + for ($i = -4; $i < 3; $i++) { $this->assertTrue($this->Time->isThisWeek("+$i days")); } $this->assertFalse($this->Time->isThisWeek("+3 days")); $this->assertFalse($this->Time->isThisWeek("-5 days")); break; case 'Sat' : - for ($i = -5; $i < 1; $i++) { + for ($i = -5; $i < 2; $i++) { $this->assertTrue($this->Time->isThisWeek("+$i days")); } $this->assertFalse($this->Time->isThisWeek("+2 days")); $this->assertFalse($this->Time->isThisWeek("-6 days")); break; case 'Sun' : - for ($i = 6; $i < 0; $i++) { + for ($i = -6; $i < 1; $i++) { $this->assertTrue($this->Time->isThisWeek("+$i days")); } $this->assertFalse($this->Time->isThisWeek("+1 days"));