diff options
Diffstat (limited to 'tests/functional/fileupload_remote_test.php')
-rw-r--r-- | tests/functional/fileupload_remote_test.php | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/tests/functional/fileupload_remote_test.php b/tests/functional/fileupload_remote_test.php index 1a74b3b498..45c1e914c2 100644 --- a/tests/functional/fileupload_remote_test.php +++ b/tests/functional/fileupload_remote_test.php @@ -22,6 +22,9 @@ class phpbb_functional_fileupload_remote_test extends phpbb_functional_test_case /** @var \phpbb\files\factory */ protected $factory; + /** @var \phpbb\php\ini */ + protected $php_ini; + /** @var \phpbb\language\language */ protected $language; @@ -51,9 +54,10 @@ class phpbb_functional_fileupload_remote_test extends phpbb_functional_test_case $this->filesystem = new \phpbb\filesystem\filesystem(); $this->language = new \phpbb\language\language(new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx)); $this->request = $this->getMock('\phpbb\request\request'); + $this->php_ini = new \phpbb\php\ini; $container = new phpbb_mock_container_builder(); - $container->set('files.filespec', new \phpbb\files\filespec($this->filesystem, $this->language, $this->phpbb_root_path)); + $container->set('files.filespec', new \phpbb\files\filespec($this->filesystem, $this->php_ini, $this->language, $this->phpbb_root_path)); $this->factory = new \phpbb\files\factory($container); $container->set('files.factory', $this->factory); $container->set('files.types.remote', new \phpbb\files\types\remote($this->factory, $this->language, $this->request, $phpbb_root_path)); @@ -70,7 +74,7 @@ class phpbb_functional_fileupload_remote_test extends phpbb_functional_test_case public function test_invalid_extension() { /** @var \phpbb\files\upload $upload */ - $upload = new \phpbb\files\upload($this->filesystem, $this->factory, $this->language, $this->request, $this->phpbb_root_path); + $upload = new \phpbb\files\upload($this->filesystem, $this->factory, $this->php_ini, $this->language, $this->request, $this->phpbb_root_path); $upload->set_error_prefix('') ->set_allowed_extensions(array('jpg')) ->set_max_filesize(100); @@ -81,7 +85,7 @@ class phpbb_functional_fileupload_remote_test extends phpbb_functional_test_case public function test_empty_file() { /** @var \phpbb\files\upload $upload */ - $upload = new \phpbb\files\upload($this->filesystem, $this->factory, $this->language, $this->request, $this->phpbb_root_path); + $upload = new \phpbb\files\upload($this->filesystem, $this->factory, $this->php_ini, $this->language, $this->request, $this->phpbb_root_path); $upload->set_error_prefix('') ->set_allowed_extensions(array('jpg')) ->set_max_filesize(100); @@ -92,7 +96,7 @@ class phpbb_functional_fileupload_remote_test extends phpbb_functional_test_case public function test_successful_upload() { /** @var \phpbb\files\upload $upload */ - $upload = new \phpbb\files\upload($this->filesystem, $this->factory, $this->language, $this->request, $this->phpbb_root_path); + $upload = new \phpbb\files\upload($this->filesystem, $this->factory, $this->php_ini, $this->language, $this->request, $this->phpbb_root_path); $upload->set_error_prefix('') ->set_allowed_extensions(array('gif')) ->set_max_filesize(1000); @@ -105,7 +109,7 @@ class phpbb_functional_fileupload_remote_test extends phpbb_functional_test_case public function test_too_large() { /** @var \phpbb\files\upload $upload */ - $upload = new \phpbb\files\upload($this->filesystem, $this->factory, $this->language, $this->request, $this->phpbb_root_path); + $upload = new \phpbb\files\upload($this->filesystem, $this->factory, $this->php_ini, $this->language, $this->request, $this->phpbb_root_path); $upload->set_error_prefix('') ->set_allowed_extensions(array('gif')) ->set_max_filesize(100); |