mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 14:00:31 +02:00
[ticket/14972] Migrate from deprecated getMock() method to createMock()
PHPBB3-14972
This commit is contained in:
@@ -39,7 +39,7 @@ class phpbb_files_types_base_test extends phpbb_test_case
|
||||
{
|
||||
global $phpbb_root_path, $phpEx;
|
||||
|
||||
$this->request = $this->getMock('\phpbb\request\request');
|
||||
$this->request = $this->createMock('\phpbb\request\request');
|
||||
|
||||
$this->filesystem = new \phpbb\filesystem\filesystem();
|
||||
$this->language = new \phpbb\language\language(new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx));
|
||||
@@ -75,7 +75,7 @@ class phpbb_files_types_base_test extends phpbb_test_case
|
||||
*/
|
||||
public function test_check_upload_size($filename, $max_filesize, $expected)
|
||||
{
|
||||
$php_ini = $this->getMock('\bantu\IniGetWrapper\IniGetWrapper');
|
||||
$php_ini = $this->createMock('\bantu\IniGetWrapper\IniGetWrapper');
|
||||
$php_ini->expects($this->any())
|
||||
->method('getString')
|
||||
->willReturn($max_filesize);
|
||||
|
@@ -42,7 +42,7 @@ class phpbb_files_types_form_test extends phpbb_test_case
|
||||
{
|
||||
global $phpbb_root_path, $phpEx;
|
||||
|
||||
$this->request = $this->getMock('\phpbb\request\request');
|
||||
$this->request = $this->createMock('\phpbb\request\request');
|
||||
$this->request->expects($this->any())
|
||||
->method('file')
|
||||
->willReturn(array());
|
||||
@@ -137,7 +137,7 @@ class phpbb_files_types_form_test extends phpbb_test_case
|
||||
*/
|
||||
public function test_upload_form($upload, $expected, $plupload = array())
|
||||
{
|
||||
$this->request = $this->getMock('\phpbb\request\request');
|
||||
$this->request = $this->createMock('\phpbb\request\request');
|
||||
$this->request->expects($this->any())
|
||||
->method('file')
|
||||
->willReturn($upload);
|
||||
|
@@ -42,7 +42,7 @@ class phpbb_files_types_local_test extends phpbb_test_case
|
||||
{
|
||||
global $phpbb_root_path, $phpEx;
|
||||
|
||||
$this->request = $this->getMock('\phpbb\request\request');
|
||||
$this->request = $this->createMock('\phpbb\request\request');
|
||||
$this->request->expects($this->any())
|
||||
->method('file')
|
||||
->willReturn(array());
|
||||
|
@@ -47,7 +47,7 @@ class phpbb_files_types_remote_test extends phpbb_test_case
|
||||
$config = new \phpbb\config\config(array());
|
||||
$this->config = $config;
|
||||
$this->config->set('remote_upload_verify', 0);
|
||||
$this->request = $this->getMock('\phpbb\request\request');
|
||||
$this->request = $this->createMock('\phpbb\request\request');
|
||||
|
||||
$this->filesystem = new \phpbb\filesystem\filesystem();
|
||||
$this->language = new \phpbb\language\language(new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx));
|
||||
@@ -102,7 +102,7 @@ class phpbb_files_types_remote_test extends phpbb_test_case
|
||||
*/
|
||||
public function test_get_max_file_size($max_file_size, $link, $expected = array('URL_NOT_FOUND'))
|
||||
{
|
||||
$php_ini = $this->getMock('\bantu\IniGetWrapper\IniGetWrapper', array('getString'));
|
||||
$php_ini = $this->createMock('\bantu\IniGetWrapper\IniGetWrapper', array('getString'));
|
||||
$php_ini->expects($this->any())
|
||||
->method('getString')
|
||||
->willReturn($max_file_size);
|
||||
|
@@ -48,7 +48,7 @@ class phpbb_files_upload_test extends phpbb_test_case
|
||||
$config['rand_seed'] = '';
|
||||
$config['rand_seed_last_update'] = time() + 600;
|
||||
|
||||
$this->request = $this->getMock('\phpbb\request\request');
|
||||
$this->request = $this->createMock('\phpbb\request\request');
|
||||
|
||||
$this->filesystem = new \phpbb\filesystem\filesystem();
|
||||
$this->language = new \phpbb\language\language(new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx));
|
||||
|
Reference in New Issue
Block a user