diff options
Diffstat (limited to 'tests/upload/fileupload_test.php')
-rw-r--r-- | tests/upload/fileupload_test.php | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/tests/upload/fileupload_test.php b/tests/upload/fileupload_test.php index 87e10ac954..56e29a3ac2 100644 --- a/tests/upload/fileupload_test.php +++ b/tests/upload/fileupload_test.php @@ -33,9 +33,8 @@ class phpbb_fileupload_test extends phpbb_test_case protected function setUp() { // Global $config required by unique_id - // Global $user required by several functions dealing with translations // Global $request required by form_upload, local_upload and is_valid - global $config, $user, $request, $phpbb_filesystem, $phpbb_root_path, $phpEx; + global $config, $request, $phpbb_root_path, $phpEx; if (!is_array($config)) { @@ -45,23 +44,20 @@ class phpbb_fileupload_test extends phpbb_test_case $config['rand_seed'] = ''; $config['rand_seed_last_update'] = time() + 600; - $user = new phpbb_mock_user(); - $user->lang = new phpbb_mock_lang(); - $request = new phpbb_mock_request(); - $this->filesystem = $phpbb_filesystem = new \phpbb\filesystem\filesystem(); + $this->filesystem = new \phpbb\filesystem\filesystem(); + $this->language = new \phpbb\language\language(new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx)); $this->container = new phpbb_mock_container_builder($phpbb_root_path, $phpEx); $this->container->set('files.filespec', new \phpbb\files\filespec( $this->filesystem, + $this->language, new \phpbb\mimetype\guesser(array( 'mimetype.extension_guesser' => new \phpbb\mimetype\extension_guesser(), )))); $this->factory = new \phpbb\files\factory($this->container); - $this->language = new \phpbb\language\language(new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx)); - $this->path = __DIR__ . '/fixture/'; } |