diff options
author | rxu <rxu@mail.ru> | 2017-03-19 21:46:20 +0700 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2019-05-08 21:57:00 +0200 |
commit | 42b7782927713c2ca2fb704db6217016347b586e (patch) | |
tree | 74d749f282d9087aa658eec91b73b461ffdc5b73 /tests/files | |
parent | cdf3aa27df099eb440fb279ac50d1fe42e7b136c (diff) | |
download | forums-42b7782927713c2ca2fb704db6217016347b586e.tar forums-42b7782927713c2ca2fb704db6217016347b586e.tar.gz forums-42b7782927713c2ca2fb704db6217016347b586e.tar.bz2 forums-42b7782927713c2ca2fb704db6217016347b586e.tar.xz forums-42b7782927713c2ca2fb704db6217016347b586e.zip |
[ticket/14972] Migrate from deprecated getMock() method to createMock()
PHPBB3-14972
Diffstat (limited to 'tests/files')
-rw-r--r-- | tests/files/types_base_test.php | 4 | ||||
-rw-r--r-- | tests/files/types_form_test.php | 4 | ||||
-rw-r--r-- | tests/files/types_local_test.php | 2 | ||||
-rw-r--r-- | tests/files/types_remote_test.php | 4 | ||||
-rw-r--r-- | tests/files/upload_test.php | 2 |
5 files changed, 8 insertions, 8 deletions
diff --git a/tests/files/types_base_test.php b/tests/files/types_base_test.php index e630bf8c48..3b1cf68d50 100644 --- a/tests/files/types_base_test.php +++ b/tests/files/types_base_test.php @@ -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); diff --git a/tests/files/types_form_test.php b/tests/files/types_form_test.php index 925babb47f..25d79f6117 100644 --- a/tests/files/types_form_test.php +++ b/tests/files/types_form_test.php @@ -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); diff --git a/tests/files/types_local_test.php b/tests/files/types_local_test.php index 31070de107..67e4c571f5 100644 --- a/tests/files/types_local_test.php +++ b/tests/files/types_local_test.php @@ -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()); diff --git a/tests/files/types_remote_test.php b/tests/files/types_remote_test.php index 1a7d63d790..85ec2a528b 100644 --- a/tests/files/types_remote_test.php +++ b/tests/files/types_remote_test.php @@ -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); diff --git a/tests/files/upload_test.php b/tests/files/upload_test.php index c41204a0d5..a9c2dca9d9 100644 --- a/tests/files/upload_test.php +++ b/tests/files/upload_test.php @@ -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)); |