summaryrefslogtreecommitdiffstats
path: root/tests/codeigniter
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-06-14 10:35:11 +0200
committerAndrey Andreev <narf@bofh.bg>2012-06-14 10:35:11 +0200
commite1c8ee76f4756442094106320d9577c2c7595959 (patch)
treeaaa5225859425b46810f2a0a362e620dfeb0307a /tests/codeigniter
parent43cfd0c37ca241618f33eae87fec720a5bcf13d6 (diff)
Alter now() tests
Diffstat (limited to 'tests/codeigniter')
-rw-r--r--tests/codeigniter/helpers/date_helper_test.php12
1 files changed, 12 insertions, 0 deletions
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)),