diff options
author | Marc Alexander <admin@m-a-styles.de> | 2015-06-02 15:06:24 +0200 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2015-09-09 08:27:52 +0200 |
commit | 697ac5f4aa151b06ed65f8352652443bf297682a (patch) | |
tree | bd88828df039b1d37ff1d68c5de1632b78fe5b51 /tests/upload/fileupload_test.php | |
parent | 6541e4cb17d3014151d469b870eac5637ed23071 (diff) | |
download | forums-697ac5f4aa151b06ed65f8352652443bf297682a.tar forums-697ac5f4aa151b06ed65f8352652443bf297682a.tar.gz forums-697ac5f4aa151b06ed65f8352652443bf297682a.tar.bz2 forums-697ac5f4aa151b06ed65f8352652443bf297682a.tar.xz forums-697ac5f4aa151b06ed65f8352652443bf297682a.zip |
[ticket/13904] Use language class instead of global user in filespec
PHPBB3-13904
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/'; } |