Use getMockBuilder() in PHPUnit instead of the deprecated getMock()
diff --git a/tests/codeigniter/core/Loader_test.php b/tests/codeigniter/core/Loader_test.php
index db5088d..c1c4997 100644
--- a/tests/codeigniter/core/Loader_test.php
+++ b/tests/codeigniter/core/Loader_test.php
@@ -291,7 +291,7 @@
 		$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 @@
 	{
 		// 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));
diff --git a/tests/codeigniter/helpers/date_helper_test.php b/tests/codeigniter/helpers/date_helper_test.php
index c80e92c..c4f99a9 100644
--- a/tests/codeigniter/helpers/date_helper_test.php
+++ b/tests/codeigniter/helpers/date_helper_test.php
@@ -15,7 +15,7 @@
 		/*
 
 		// This stub job, is simply to cater $config['time_reference']
-		$config = $this->getMock('CI_Config');
+		$config = $this->getMockBuilder('CI_Config')->getMock();
 		$config->expects($this->any())
 			   ->method('item')
 			   ->will($this->returnValue('local'));
@@ -37,7 +37,7 @@
 		/*
 
 		// This stub job, is simply to cater $config['time_reference']
-		$config = $this->getMock('CI_Config');
+		$config = $this->getMockBuilder('CI_Config')->getMock();
 		$config->expects($this->any())
 			   ->method('item')
 			   ->will($this->returnValue('UTC'));
diff --git a/tests/codeigniter/helpers/language_helper_test.php b/tests/codeigniter/helpers/language_helper_test.php
index 176da68..1ddabea 100644
--- a/tests/codeigniter/helpers/language_helper_test.php
+++ b/tests/codeigniter/helpers/language_helper_test.php
@@ -5,7 +5,7 @@
 	public function test_lang()
 	{
 		$this->helper('language');
-		$lang = $this->getMock('CI_Lang', array('line'));
+		$lang = $this->getMockBuilder('CI_Lang')->setMethods(array('line'))->getMock();
 		$lang->expects($this->any())->method('line')->will($this->returnValue(FALSE));
 		$this->ci_instance_var('lang', $lang);
 
@@ -13,4 +13,4 @@
 		$this->assertEquals('<label for="foo" class="bar"></label>', lang(1, 'foo', array('class' => 'bar')));
 	}
 
-}
\ No newline at end of file
+}
diff --git a/tests/codeigniter/helpers/number_helper_test.php b/tests/codeigniter/helpers/number_helper_test.php
index 817db2c..663e354 100644
--- a/tests/codeigniter/helpers/number_helper_test.php
+++ b/tests/codeigniter/helpers/number_helper_test.php
@@ -11,7 +11,7 @@
 
 		// Mock away load, too much going on in there,
 		// we'll just check for the expected parameter
-		$lang = $this->getMock($lang_cls, array('load'));
+		$lang = $this->getMockBuilder('CI_Lang')->setMethods(array('load'))->getMock();
 		$lang->expects($this->once())
 			 ->method('load')
 			 ->with($this->equalTo('number'));
@@ -60,4 +60,4 @@
 		$this->assertEquals('112,283.3 TB', byte_format(123456789123456789));
 	}
 
-}
\ No newline at end of file
+}
diff --git a/tests/codeigniter/libraries/Calendar_test.php b/tests/codeigniter/libraries/Calendar_test.php
index 54879fe..ad1f45e 100644
--- a/tests/codeigniter/libraries/Calendar_test.php
+++ b/tests/codeigniter/libraries/Calendar_test.php
@@ -5,9 +5,9 @@
 	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 @@
 		$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 c62cbee..e4401e6 100644
--- a/tests/codeigniter/libraries/Driver_test.php
+++ b/tests/codeigniter/libraries/Driver_test.php
@@ -16,7 +16,7 @@
 
 		// 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 @@
 		$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 b87ca65..905f663 100644
--- a/tests/codeigniter/libraries/Form_validation_test.php
+++ b/tests/codeigniter/libraries/Form_validation_test.php
@@ -8,10 +8,10 @@
 
 		// 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 820bd37..8bac597 100644
--- a/tests/codeigniter/libraries/Upload_test.php
+++ b/tests/codeigniter/libraries/Upload_test.php
@@ -7,7 +7,7 @@
 		$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 @@
 		$this->assertEquals('<p>Error test</p>', $this->upload->display_errors());
 	}
 
-}
\ No newline at end of file
+}