diff options
Diffstat (limited to 'tests/codeigniter/libraries')
-rw-r--r-- | tests/codeigniter/libraries/Calendar_test.php | 6 | ||||
-rw-r--r-- | tests/codeigniter/libraries/Driver_test.php | 4 | ||||
-rw-r--r-- | tests/codeigniter/libraries/Form_validation_test.php | 4 | ||||
-rw-r--r-- | tests/codeigniter/libraries/Upload_test.php | 4 |
4 files changed, 9 insertions, 9 deletions
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 +} diff --git a/tests/codeigniter/libraries/Driver_test.php b/tests/codeigniter/libraries/Driver_test.php index c62cbee45..e4401e688 100644 --- a/tests/codeigniter/libraries/Driver_test.php +++ b/tests/codeigniter/libraries/Driver_test.php @@ -16,7 +16,7 @@ class Driver_test extends CI_TestCase { // Mock Loader->get_package_paths $paths = 'get_package_paths'; - $ldr = $this->getMock('CI_Loader', array($paths)); + $ldr = $this->getMockBuilder('CI_Loader')->setMethods(array($paths))->getMock(); $ldr->expects($this->any())->method($paths)->will($this->returnValue(array(APPPATH, BASEPATH))); $this->ci_instance_var('load', $ldr); @@ -175,4 +175,4 @@ class Driver_test extends CI_TestCase { $this->assertEquals($return, $child->$method()); } -}
\ No newline at end of file +} diff --git a/tests/codeigniter/libraries/Form_validation_test.php b/tests/codeigniter/libraries/Form_validation_test.php index b87ca65ff..905f663e2 100644 --- a/tests/codeigniter/libraries/Form_validation_test.php +++ b/tests/codeigniter/libraries/Form_validation_test.php @@ -8,10 +8,10 @@ class Form_validation_test extends CI_TestCase { // Create a mock loader since load->helper() looks in the wrong directories for unit tests, // We'll use CI_TestCase->helper() instead - $loader = $this->getMock('CI_Loader', array('helper')); + $loader = $this->getMockBuilder('CI_Loader')->setMethods(array('helper'))->getMock(); // Same applies for lang - $lang = $this->getMock('CI_Lang', array('load')); + $lang = $this->getMockBuilder('CI_Lang')->setMethods(array('load'))->getMock(); $this->ci_set_config('charset', 'UTF-8'); $utf8 = new Mock_Core_Utf8(); diff --git a/tests/codeigniter/libraries/Upload_test.php b/tests/codeigniter/libraries/Upload_test.php index 820bd37e2..8bac597b3 100644 --- a/tests/codeigniter/libraries/Upload_test.php +++ b/tests/codeigniter/libraries/Upload_test.php @@ -7,7 +7,7 @@ class Upload_test extends CI_TestCase { $ci = $this->ci_instance(); $ci->upload = new CI_Upload(); $ci->security = new Mock_Core_Security(); - $ci->lang = $this->getMock('CI_Lang', array('load', 'line')); + $ci->lang = $this->getMockBuilder('CI_Lang')->setMethods(array('load', 'line'))->getMock(); $ci->lang->expects($this->any())->method('line')->will($this->returnValue(FALSE)); $this->upload = $ci->upload; } @@ -296,4 +296,4 @@ class Upload_test extends CI_TestCase { $this->assertEquals('<p>Error test</p>', $this->upload->display_errors()); } -}
\ No newline at end of file +} |