From 1b60fda70ff1e1801c133575c530ef0a5a450029 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sat, 9 Jun 2012 21:07:40 +0300 Subject: Modified date helper tests for better accuracy --- tests/codeigniter/helpers/date_helper_test.php | 11 ++++------- 1 file 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))); } // ------------------------------------------------------------------------ -- cgit v1.2.3-24-g4f1b