diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-11-25 14:05:57 +0100 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-11-25 14:05:57 +0100 |
commit | ade05b40714070bcda7ab32187068e95b98c8cf8 (patch) | |
tree | 7908487f27840c04b28909363093d77de3415249 /tests/codeigniter/libraries/Calendar_test.php | |
parent | ad5f1d032fb3204bc1b81891a3231ae8ac47392b (diff) | |
parent | 1713d322a309d9cf405cfe83e2131368f29b222b (diff) |
Merge pull request #2030 from dchill42/unit_tests
Replaced Mock_Core_Lang with PHPUnit mockups
Diffstat (limited to 'tests/codeigniter/libraries/Calendar_test.php')
-rw-r--r-- | tests/codeigniter/libraries/Calendar_test.php | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/tests/codeigniter/libraries/Calendar_test.php b/tests/codeigniter/libraries/Calendar_test.php index 95668d70d..952e8a8d2 100644 --- a/tests/codeigniter/libraries/Calendar_test.php +++ b/tests/codeigniter/libraries/Calendar_test.php @@ -2,12 +2,12 @@ class Calendar_test extends CI_TestCase { - function __construct() + function set_up() { - $obj = new stdClass; - $obj->calendar = new Mock_Libraries_Calendar(); - - $this->calendar = $obj->calendar; + $lang = $this->getMock('CI_Lang', array('load', 'line')); + $lang->expects($this->any())->method('line')->will($this->returnValue(FALSE)); + $this->ci_instance_var('lang', $lang); + $this->calendar = new CI_Calendar(); } function test_initialize() @@ -20,9 +20,6 @@ class Calendar_test extends CI_TestCase { $this->assertEquals('monday', $this->calendar->start_day); } - /** - * @covers Mock_Libraries_Calendar::parse_template - */ function test_generate() { $no_events = '<table border="0" cellpadding="4" cellspacing="0"> |