diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-06-09 20:07:40 +0200 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-06-09 20:07:40 +0200 |
commit | 1b60fda70ff1e1801c133575c530ef0a5a450029 (patch) | |
tree | 2937e62c79fe4658be3621e1c40dc8c73ac30976 /tests | |
parent | 9e674f74ec4f36f11f30e2f84a48ef6cea33a9d9 (diff) |
Modified date helper tests for better accuracy
Diffstat (limited to 'tests')
-rw-r--r-- | tests/codeigniter/helpers/date_helper_test.php | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/tests/codeigniter/helpers/date_helper_test.php b/tests/codeigniter/helpers/date_helper_test.php index 17d1ef21e..df03fe32c 100644 --- a/tests/codeigniter/helpers/date_helper_test.php +++ b/tests/codeigniter/helpers/date_helper_test.php @@ -16,13 +16,11 @@ class Date_helper_test extends CI_TestCase { $config->expects($this->any()) ->method('item') ->will($this->returnValue('local')); - + // Add the stub to our test instance $this->ci_instance_var('config', $config); - $expected = time(); - $test = now(); - $this->assertEquals($expected, $test); + $this->assertEquals(time(), now()); } // ------------------------------------------------------------------------ @@ -34,7 +32,7 @@ class Date_helper_test extends CI_TestCase { $config->expects($this->any()) ->method('item') ->will($this->returnValue('gmt')); - + // Add the stub to our stdClass $this->ci_instance_var('config', $config); @@ -204,8 +202,7 @@ class Date_helper_test extends CI_TestCase { public function test_mysql_to_unix() { $time = time(); - $this->assertEquals($time, - mysql_to_unix(date("Y-m-d H:i:s", $time))); + $this->assertEquals($time, mysql_to_unix(date("Y-m-d H:i:s", $time))); } // ------------------------------------------------------------------------ |