1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +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

@@ -54,8 +54,12 @@ class phpbb_attachment_upload_test extends \phpbb_database_test_case
/** @var \phpbb\attachment\upload */
protected $upload;
/** @var \phpbb\filesystem\filesystem */
private $filesystem;
/** @var \phpbb\filesystem\temp */
protected $temp;
/** @var \Symfony\Component\DependencyInjection\ContainerInterface */
protected $container;
@@ -85,7 +89,7 @@ class phpbb_attachment_upload_test extends \phpbb_database_test_case
$this->cache = new \phpbb\cache\service(new \phpbb\cache\driver\dummy(), $this->config, $this->db, $phpbb_root_path, $phpEx);
$this->request = $this->createMock('\phpbb\request\request');
$this->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->php_ini = new \bantu\IniGetWrapper\IniGetWrapper;
$guessers = array(
@@ -143,6 +147,7 @@ class phpbb_attachment_upload_test extends \phpbb_database_test_case
$this->factory = new \phpbb\files\factory($this->container);
$this->files_upload = new \phpbb\files\upload($this->filesystem, $this->factory, $this->language, $this->php_ini, $this->request, $this->phpbb_root_path);
$this->phpbb_dispatcher = new phpbb_mock_event_dispatcher();
$this->temp = new \phpbb\filesystem\temp($this->filesystem, '');
$this->user = new \phpbb\user($this->language, '\phpbb\datetime');
$this->upload = new \phpbb\attachment\upload(
@@ -155,6 +160,7 @@ class phpbb_attachment_upload_test extends \phpbb_database_test_case
$this->phpbb_dispatcher,
$this->plupload,
$this->storage,
$this->temp,
$this->user
);
}
@@ -247,6 +253,7 @@ class phpbb_attachment_upload_test extends \phpbb_database_test_case
$this->phpbb_dispatcher,
$this->plupload,
$this->storage,
$this->temp,
$this->user
);
@@ -411,6 +418,7 @@ class phpbb_attachment_upload_test extends \phpbb_database_test_case
$this->phpbb_dispatcher,
$plupload,
$this->storage,
$this->temp,
$this->user
);