diff options
author | Alex Bilbie <alex@alexbilbie.com> | 2012-09-03 19:57:35 +0200 |
---|---|---|
committer | Alex Bilbie <alex@alexbilbie.com> | 2012-09-03 19:57:35 +0200 |
commit | 5e9710842dc6981f4eb03c1622eabee9b3171dea (patch) | |
tree | cbe403ac0b2a4734145b15c8164a0fdbfd86043c /tests/mocks/libraries/calendar.php | |
parent | b7c5444de271fb524f8a21d57f384fc0735175c0 (diff) |
Added Calendar library unit test
Diffstat (limited to 'tests/mocks/libraries/calendar.php')
-rw-r--r-- | tests/mocks/libraries/calendar.php | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/mocks/libraries/calendar.php b/tests/mocks/libraries/calendar.php new file mode 100644 index 000000000..8fee5365e --- /dev/null +++ b/tests/mocks/libraries/calendar.php @@ -0,0 +1,25 @@ +<?php + +class Mock_Libraries_Calendar extends CI_Calendar { + + public function __construct($config = array()) + { + $this->CI = new stdClass; + $this->CI->lang = new Mock_Core_Lang(); + + if ( ! in_array('calendar_lang.php', $this->CI->lang->is_loaded, TRUE)) + { + $this->CI->lang->load('calendar'); + } + + $this->local_time = time(); + + if (count($config) > 0) + { + $this->initialize($config); + } + + log_message('debug', 'Calendar Class Initialized'); + } + +}
\ No newline at end of file |