summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorGreg Aker <greg@gregaker.net>2011-08-21 23:19:16 +0200
committerGreg Aker <greg@gregaker.net>2011-08-21 23:19:16 +0200
commit2e0f825c942e7e77a9aba451f3252762db0c86f5 (patch)
tree0b1ded4aa45a6e896f581cab095cd8463e1cddcc /tests
parentb47af4423cea88ff3fef199e1871d7b9c0f3b0d3 (diff)
Fixing errors in date helper tests.
Diffstat (limited to 'tests')
-rw-r--r--tests/codeigniter/helpers/date_helper_test.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/codeigniter/helpers/date_helper_test.php b/tests/codeigniter/helpers/date_helper_test.php
index 63cf30bbe..c7a2c9b6e 100644
--- a/tests/codeigniter/helpers/date_helper_test.php
+++ b/tests/codeigniter/helpers/date_helper_test.php
@@ -158,7 +158,9 @@ class Date_helper_test extends CI_TestCase
public function test_mysql_to_unix()
{
- $this->assertEquals(1344708680, mysql_to_unix(date("YYYY-MM-DD HH:MM:SS")));
+ $time = time();
+ $this->assertEquals($time,
+ mysql_to_unix(date("Y-m-d H:i:s", $time)));
}
// ------------------------------------------------------------------------
@@ -166,9 +168,9 @@ class Date_helper_test extends CI_TestCase
public function test_unix_to_human()
{
$time = time();
- $this->assertEquals(date("Y-m-d h:i A"), unix_to_human($time));
- $this->assertEquals(date("Y-m-d h:i:s A"), unix_to_human($time, TRUE, 'us'));
- $this->assertEquals(date("Y-m-d H:i:s"), unix_to_human($time, TRUE, 'eu'));
+ $this->assertEquals(date("Y-m-d h:i A", $time), unix_to_human($time));
+ $this->assertEquals(date("Y-m-d h:i:s A", $time), unix_to_human($time, TRUE, 'us'));
+ $this->assertEquals(date("Y-m-d H:i:s", $time), unix_to_human($time, TRUE, 'eu'));
}
// ------------------------------------------------------------------------