mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 10:36:16 +00:00
fixing failing timehelper tests (isThisWeek())
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6764 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
2e1f8c6303
commit
7985746190
1 changed files with 5 additions and 5 deletions
|
@ -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"));
|
||||
|
|
Loading…
Add table
Reference in a new issue