From e1c8ee76f4756442094106320d9577c2c7595959 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 14 Jun 2012 11:35:11 +0300 Subject: Alter now() tests --- tests/codeigniter/helpers/date_helper_test.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests/codeigniter/helpers/date_helper_test.php') diff --git a/tests/codeigniter/helpers/date_helper_test.php b/tests/codeigniter/helpers/date_helper_test.php index 4b747b864..bcb1477bc 100644 --- a/tests/codeigniter/helpers/date_helper_test.php +++ b/tests/codeigniter/helpers/date_helper_test.php @@ -13,6 +13,8 @@ class Date_helper_test extends CI_TestCase { public function test_now_local() { + /* + // This stub job, is simply to cater $config['time_reference'] $config = $this->getMock('CI_Config'); $config->expects($this->any()) @@ -22,6 +24,10 @@ class Date_helper_test extends CI_TestCase { // Add the stub to our test instance $this->ci_instance_var('config', $config); + */ + + $this->ci_set_config('time_reference', 'local'); + $this->assertEquals(time(), now()); } @@ -29,6 +35,8 @@ class Date_helper_test extends CI_TestCase { public function test_now_gmt() { + /* + // This stub job, is simply to cater $config['time_reference'] $config = $this->getMock('CI_Config'); $config->expects($this->any()) @@ -38,6 +46,10 @@ class Date_helper_test extends CI_TestCase { // Add the stub to our stdClass $this->ci_instance_var('config', $config); + */ + + $this->ci_set_config('time_reference', 'gmt'); + $t = time(); $this->assertEquals( mktime(gmdate('H', $t), gmdate('i', $t), gmdate('s', $t), gmdate('m', $t), gmdate('d', $t), gmdate('Y', $t)), -- cgit v1.2.3-24-g4f1b