1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-11 03:04:09 +02:00

[ticket/15311] Move get_temp_dir to another service

PHPBB3-15311
This commit is contained in:
Rubén Calvo
2018-05-30 23:15:31 +02:00
parent d156bf3757
commit b43268e8fc
52 changed files with 160 additions and 130 deletions

View File

@@ -19,6 +19,9 @@ class phpbb_functional_fileupload_remote_test extends phpbb_functional_test_case
/** @var \phpbb\filesystem\filesystem_interface */
protected $filesystem;
/** @var \phpbb\filesystem\temp */
protected $temp;
/** @var \phpbb\files\factory */
protected $factory;
@@ -52,7 +55,8 @@ class phpbb_functional_fileupload_remote_test extends phpbb_functional_test_case
$config['rand_seed_last_update'] = time() + 600;
$config['remote_upload_verify'] = 0;
$this->filesystem = new \phpbb\filesystem\filesystem('');
$this->filesystem = new \phpbb\filesystem\filesystem();
$this->temp = new \phpbb\filesystem\temp($this->filesystem, '');
$this->language = new \phpbb\language\language(new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx));
$this->request = $this->createMock('\phpbb\request\request');
$this->php_ini = new \bantu\IniGetWrapper\IniGetWrapper;
@@ -61,7 +65,7 @@ class phpbb_functional_fileupload_remote_test extends phpbb_functional_test_case
$container->set('files.filespec', new \phpbb\files\filespec($this->filesystem, $this->language, $this->php_ini, new \FastImageSize\FastImageSize(), $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($config, $this->factory, $this->filesystem, $this->language, $this->php_ini, $this->request, $phpbb_root_path));
$container->set('files.types.remote', new \phpbb\files\types\remote($config, $this->factory, $this->temp, $this->language, $this->php_ini, $this->request));
$this->phpbb_root_path = $phpbb_root_path;
}