Skip to content

Commit 4f020ae

Browse files
thirschthePanz
authored andcommitted
Fixed test 1325TestCase.php
1 parent 1d68711 commit 4f020ae

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tests/Ticket/1325TestCase.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ public function prepareTables()
4141

4242
public function testShouldInsertWithoutAlias()
4343
{
44+
$now = time();
45+
4446
$elem = new Ticket_1325_TableName_NoAlias();
4547
$elem->id = 1;
4648
$elem->save();
@@ -49,13 +51,14 @@ public function testShouldInsertWithoutAlias()
4951
->from('Ticket_1325_TableName_NoAlias')
5052
->fetchOne(array(), Doctrine_Core::HYDRATE_ARRAY);
5153

52-
$now = time();
5354
$time = strtotime($res['event_date']);
5455
$this->assertTrue(($now + 5 >= $time) && ($time >= $now));
5556
}
5657

5758
public function testShouldInsertWithAlias()
5859
{
60+
$now = time();
61+
5962
$elem = new Ticket_1325_TableName_Aliased();
6063
$elem->id = 1;
6164
$elem->save();
@@ -64,9 +67,8 @@ public function testShouldInsertWithAlias()
6467
->from('Ticket_1325_TableName_Aliased')
6568
->fetchOne(array(), Doctrine_Core::HYDRATE_ARRAY);
6669

67-
$now = time();
6870
$time = strtotime($res['eventDate']);
69-
$this->assertTrue(strtotime($res['eventDate']) > 0);
71+
$this->assertTrue(($now + 5 >= $time) && ($time >= $now));
7072
}
7173
}
7274

0 commit comments

Comments
 (0)