diff options
author | Maat <maat-pub@mageia.biz> | 2020-05-09 01:15:08 +0200 |
---|---|---|
committer | Maat <maat-pub@mageia.biz> | 2020-05-09 01:15:08 +0200 |
commit | 6985226b17e8a0ef0a720bf1d12fe0c216e13dab (patch) | |
tree | 116d2565ac02c40abe0548863c6badf8ec3e1d1e /tests/upload | |
parent | 8ea437e30605e0f66b5220bf904a61d7c1d11ddd (diff) | |
parent | 8d00784dfe2c8bcb10843ff70b4cfa998d703285 (diff) | |
download | forums-6985226b17e8a0ef0a720bf1d12fe0c216e13dab.tar forums-6985226b17e8a0ef0a720bf1d12fe0c216e13dab.tar.gz forums-6985226b17e8a0ef0a720bf1d12fe0c216e13dab.tar.bz2 forums-6985226b17e8a0ef0a720bf1d12fe0c216e13dab.tar.xz forums-6985226b17e8a0ef0a720bf1d12fe0c216e13dab.zip |
Diffstat (limited to 'tests/upload')
-rw-r--r-- | tests/upload/filespec_test.php | 8 | ||||
-rw-r--r-- | tests/upload/fileupload_test.php | 10 | ||||
-rw-r--r-- | tests/upload/imagesize_test.php | 2 |
3 files changed, 10 insertions, 10 deletions
diff --git a/tests/upload/filespec_test.php b/tests/upload/filespec_test.php index b41b95d925..656b801372 100644 --- a/tests/upload/filespec_test.php +++ b/tests/upload/filespec_test.php @@ -28,7 +28,7 @@ class phpbb_filespec_test extends phpbb_test_case /** @var string phpBB root path */ protected $phpbb_root_path; - protected function setUp() + protected function setUp(): void { // Global $config required by unique_id global $config, $phpbb_root_path, $phpEx; @@ -101,7 +101,7 @@ class phpbb_filespec_test extends phpbb_test_case return $filespec->set_upload_ary(array_merge($upload_ary, $override)); } - protected function tearDown() + protected function tearDown(): void { $this->config = array(); @@ -420,7 +420,7 @@ class phpbb_filespec_test extends phpbb_test_case /** * @dataProvider data_move_file_copy */ - public function test_move_file_copy($tmp_name, $move_success, $safe_mode_on, $expected_error) + public function test_move_file_copy($tmp_name, $move_success, $open_basedir_on, $expected_error) { // Initialise a blank filespec object for use with trivial methods $upload_ary = array( @@ -436,7 +436,7 @@ class phpbb_filespec_test extends phpbb_test_case $php_ini->expects($this->any()) ->method('getBool') ->with($this->anything()) - ->willReturn($safe_mode_on); + ->willReturn($open_basedir_on); $upload = new phpbb_mock_fileupload(); $upload->max_filesize = self::UPLOAD_MAX_FILESIZE; $filespec = new \phpbb\files\filespec($this->filesystem, $this->language, $php_ini, new \FastImageSize\FastImagesize, '', $this->mimetype_guesser); diff --git a/tests/upload/fileupload_test.php b/tests/upload/fileupload_test.php index 5b3357237d..ca9259d357 100644 --- a/tests/upload/fileupload_test.php +++ b/tests/upload/fileupload_test.php @@ -37,7 +37,7 @@ class phpbb_fileupload_test extends phpbb_test_case /** @var string phpBB root path */ protected $phpbb_root_path; - protected function setUp() + protected function setUp(): void { // Global $config required by unique_id global $config, $phpbb_root_path, $phpEx; @@ -50,7 +50,7 @@ class phpbb_fileupload_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->php_ini = new \bantu\IniGetWrapper\IniGetWrapper; $this->filesystem = new \phpbb\filesystem\filesystem(); @@ -83,13 +83,13 @@ class phpbb_fileupload_test extends phpbb_test_case $this->php_ini, $plupload, $this->request - ), phpbb_mock_container_builder::SCOPE_PROTOTYPE); + )); $this->container->set('files.types.local', new \phpbb\files\types\local( $this->factory, $this->language, $this->php_ini, $this->request - ), phpbb_mock_container_builder::SCOPE_PROTOTYPE); + )); $this->path = __DIR__ . '/fixture/'; $this->phpbb_root_path = $phpbb_root_path; @@ -107,7 +107,7 @@ class phpbb_fileupload_test extends phpbb_test_case return $filespec; } - protected function tearDown() + protected function tearDown(): void { // Clear globals global $config, $user; diff --git a/tests/upload/imagesize_test.php b/tests/upload/imagesize_test.php index 5429bb5c5e..3adf61dedc 100644 --- a/tests/upload/imagesize_test.php +++ b/tests/upload/imagesize_test.php @@ -20,7 +20,7 @@ class phpbb_upload_imagesize_test extends \phpbb_test_case /** @var string Path to fixtures */ protected $path; - public function setUp() + public function setUp(): void { parent::setUp(); $this->imagesize = new \FastImageSize\FastImageSize(); |