1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

[ticket/15286] Fix tests

PHPBB3-15286
This commit is contained in:
Rubén Calvo
2017-08-09 14:22:03 +02:00
parent ef43dbdcca
commit a176fa56ef
4 changed files with 25 additions and 35 deletions

View File

@@ -99,15 +99,13 @@ class phpbb_attachment_upload_test extends \phpbb_database_test_case
$this->mimetype_guesser = new \phpbb\mimetype\guesser($guessers);
$this->plupload = new \phpbb\plupload\plupload($phpbb_root_path, $this->config, $this->request, new \phpbb\user($this->language, '\phpbb\datetime'), $this->php_ini, $this->mimetype_guesser);
$local_adapter = new \phpbb\storage\adapter\local($this->filesystem, $phpbb_root_path);
$local_adapter->configure(['path' => 'files']);
$adapter_factory_mock = $this->getMockBuilder('\phpbb\storage\adapter_factory')
->disableOriginalConstructor()
->getMock();
$adapter = new \phpbb\storage\adapter\local($this->filesystem, $phpbb_root_path);
$adapter->configure(['path' => 'files']);
$adapter_factory_mock = $this->createMock('\phpbb\storage\adapter_factory');
$adapter_factory_mock->expects($this->any())
->method('get')
->willReturn($local_adapter);
$this->storage = new \phpbb\storage\storage($adapter_factory_mock, 'attachment');
->willReturn($adapter);
$this->storage = new \phpbb\storage\storage($adapter_factory_mock, '');
$factory_mock = $this->getMockBuilder('\phpbb\files\factory')
->disableOriginalConstructor()