From 878e23f8883b2510d573850deb7dca5761cc1848 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 10 Aug 2016 15:15:49 +0300 Subject: Use getMockBuilder() in PHPUnit instead of the deprecated getMock() --- tests/codeigniter/libraries/Calendar_test.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/codeigniter/libraries/Calendar_test.php') diff --git a/tests/codeigniter/libraries/Calendar_test.php b/tests/codeigniter/libraries/Calendar_test.php index 54879fec9..ad1f45e8c 100644 --- a/tests/codeigniter/libraries/Calendar_test.php +++ b/tests/codeigniter/libraries/Calendar_test.php @@ -5,9 +5,9 @@ class Calendar_test extends CI_TestCase { public function set_up() { // Required for get_total_days() - $this->ci_instance_var('load', $this->getMock('CI_Loader', array('helper'))); + $this->ci_instance_var('load', $this->getMockBuilder('CI_Loader')->setMethods(array('helper'))->getMock()); - $lang = $this->getMock('CI_Lang', array('load', 'line')); + $lang = $this->getMockBuilder('CI_Lang')->setMethods(array('load', 'line'))->getMock(); $lang->expects($this->any())->method('line')->will($this->returnValue(FALSE)); $this->ci_instance_var('lang', $lang); @@ -219,4 +219,4 @@ class Calendar_test extends CI_TestCase { $this->assertEquals($array, $this->calendar->default_template()); } -} \ No newline at end of file +} -- cgit v1.2.3-24-g4f1b