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/core/Loader_test.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/codeigniter/core/Loader_test.php') diff --git a/tests/codeigniter/core/Loader_test.php b/tests/codeigniter/core/Loader_test.php index db5088d80..c1c4997c4 100644 --- a/tests/codeigniter/core/Loader_test.php +++ b/tests/codeigniter/core/Loader_test.php @@ -291,7 +291,7 @@ class Loader_test extends CI_TestCase { $this->assertEquals($content.$value, $out); // Mock output class - $output = $this->getMock('CI_Output', array('append_output')); + $output = $this->getMockBuilder('CI_Output')->setMethods(array('append_output'))->getMock(); $output->expects($this->once())->method('append_output')->with($content.$value); $this->ci_instance_var('output', $output); @@ -441,7 +441,7 @@ class Loader_test extends CI_TestCase { { // Mock lang class and test load call $file = 'test'; - $lang = $this->getMock('CI_Lang', array('load')); + $lang = $this->getMockBuilder('CI_Lang')->setMethods(array('load'))->getMock(); $lang->expects($this->once())->method('load')->with($file); $this->ci_instance_var('lang', $lang); $this->assertInstanceOf('CI_Loader', $this->load->language($file)); -- cgit v1.2.3-24-g4f1b