1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-11 03:04:09 +02:00

[ticket/14972] Migrate from deprecated getMock() method to createMock()

PHPBB3-14972
This commit is contained in:
rxu
2017-03-19 21:46:20 +07:00
parent 055a5f8040
commit e3859d894d
70 changed files with 168 additions and 141 deletions

View File

@@ -23,8 +23,9 @@ class phpbb_installer_config_test extends phpbb_test_case
public function setUp()
{
$phpbb_root_path = __DIR__ . './../../phpBB/';
$filesystem = $this->getMock('\phpbb\filesystem\filesystem');
$filesystem = $this->createMock('\phpbb\filesystem\filesystem');
$php_ini = $this->getMockBuilder('\bantu\IniGetWrapper\IniGetWrapper')
->setMethods(array('getInt', 'getBytes'))
->getMock();
$php_ini->method('getInt')
->willReturn(-1);

View File

@@ -42,7 +42,7 @@ class module_base_test extends phpbb_test_case
$this->module = new test_installer_module($module_collection, true, false);
$iohandler = $this->getMock('\phpbb\install\helper\iohandler\iohandler_interface');
$iohandler = $this->createMock('\phpbb\install\helper\iohandler\iohandler_interface');
$config = new \phpbb\install\helper\config(new \phpbb\filesystem\filesystem(), new \bantu\IniGetWrapper\IniGetWrapper(), '', 'php');
$this->module->setup($config, $iohandler);
}