1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-11 19:24:01 +02:00

[ticket/16346] Fix method arguments

PHPBB3-16346
This commit is contained in:
rubencm
2020-08-14 18:42:50 +00:00
parent 758c28ca69
commit 490ddbc2cd
46 changed files with 78 additions and 144 deletions

View File

@@ -68,7 +68,7 @@ class phpbb_fileupload_test extends phpbb_test_case
$guessers[3]->set_priority(-2);
$this->mimetype_guesser = new \phpbb\mimetype\guesser($guessers);
$this->container = new phpbb_mock_container_builder($phpbb_root_path, $phpEx);
$this->container = new phpbb_mock_container_builder();
$this->container->set('files.filespec', new \phpbb\files\filespec(
$this->filesystem,
$this->language,
@@ -120,7 +120,7 @@ class phpbb_fileupload_test extends phpbb_test_case
public function test_common_checks_invalid_extension()
{
$upload = new \phpbb\files\upload($this->factory, $this->language, $this->php_ini, $this->request, $this->phpbb_root_path);
$upload = new \phpbb\files\upload($this->factory, $this->language, $this->php_ini, $this->request);
$upload->set_allowed_extensions(array('png'))
->set_max_filesize(100);
$file = $this->gen_valid_filespec();
@@ -130,7 +130,7 @@ class phpbb_fileupload_test extends phpbb_test_case
public function test_common_checks_disallowed_content()
{
$upload = new \phpbb\files\upload($this->factory, $this->language, $this->php_ini, $this->request, $this->phpbb_root_path);
$upload = new \phpbb\files\upload($this->factory, $this->language, $this->php_ini, $this->request);
$upload->set_allowed_extensions(array('jpg'))
->set_max_filesize(1000);
$file = new \phpbb\files\filespec($this->filesystem, $this->language, $this->php_ini, new \FastImageSize\FastImageSize(), $this->phpbb_root_path);
@@ -149,7 +149,7 @@ class phpbb_fileupload_test extends phpbb_test_case
public function test_common_checks_invalid_filename()
{
$upload = new \phpbb\files\upload($this->factory, $this->language, $this->php_ini, $this->request, $this->phpbb_root_path);
$upload = new \phpbb\files\upload($this->factory, $this->language, $this->php_ini, $this->request);
$upload->set_allowed_extensions(array('jpg'))
->set_max_filesize(100);
$file = $this->gen_valid_filespec();
@@ -160,7 +160,7 @@ class phpbb_fileupload_test extends phpbb_test_case
public function test_common_checks_too_large()
{
$upload = new \phpbb\files\upload($this->factory, $this->language, $this->php_ini, $this->request, $this->phpbb_root_path);
$upload = new \phpbb\files\upload($this->factory, $this->language, $this->php_ini, $this->request);
$upload->set_allowed_extensions(array('jpg'))
->set_max_filesize(100);
$file = $this->gen_valid_filespec();
@@ -171,7 +171,7 @@ class phpbb_fileupload_test extends phpbb_test_case
public function test_common_checks_valid_file()
{
$upload = new \phpbb\files\upload($this->factory, $this->language, $this->php_ini, $this->request, $this->phpbb_root_path);
$upload = new \phpbb\files\upload($this->factory, $this->language, $this->php_ini, $this->request);
$upload->set_allowed_extensions(array('jpg'))
->set_max_filesize(1000);
$file = $this->gen_valid_filespec();
@@ -181,7 +181,7 @@ class phpbb_fileupload_test extends phpbb_test_case
public function test_local_upload()
{
$upload = new \phpbb\files\upload($this->factory, $this->language, $this->php_ini, $this->request, $this->phpbb_root_path);
$upload = new \phpbb\files\upload($this->factory, $this->language, $this->php_ini, $this->request);
$upload->set_allowed_extensions(array('jpg'))
->set_max_filesize(1000);
@@ -195,7 +195,7 @@ class phpbb_fileupload_test extends phpbb_test_case
public function test_move_existent_file()
{
$upload = new \phpbb\files\upload($this->factory, $this->language, $this->php_ini, $this->request, $this->phpbb_root_path);
$upload = new \phpbb\files\upload($this->factory, $this->language, $this->php_ini, $this->request);
$upload->set_allowed_extensions(array('jpg'))
->set_max_filesize(1000);
@@ -209,7 +209,7 @@ class phpbb_fileupload_test extends phpbb_test_case
public function test_move_existent_file_overwrite()
{
$upload = new \phpbb\files\upload($this->factory, $this->language, $this->php_ini, $this->request, $this->phpbb_root_path);
$upload = new \phpbb\files\upload($this->factory, $this->language, $this->php_ini, $this->request);
$upload->set_allowed_extensions(array('jpg'))
->set_max_filesize(1000);