mirror of
https://github.com/phpbb/phpbb.git
synced 2025-04-13 20:32:11 +02:00
[ticket/15286] Fix tests after rebase
PHPBB3-15286
This commit is contained in:
parent
6bd01d1506
commit
f80c59cb05
@ -278,6 +278,7 @@ else
|
||||
* @var array extensions Array with file extensions data
|
||||
* @var string mode Download mode
|
||||
* @var bool thumbnail Flag indicating if the file is a thumbnail
|
||||
* @var string redirect Do a redirection instead of reading the file
|
||||
* @since 3.1.6-RC1
|
||||
* @changed 3.1.7-RC1 Fixing wrong name of a variable (replacing "extension" by "extensions")
|
||||
* @changed 3.3.0-a1 Add redirect variable
|
||||
@ -314,7 +315,8 @@ else
|
||||
{
|
||||
redirect($redirect, false, true);
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
send_file_to_browser($attachment, $display_cat);
|
||||
}
|
||||
|
||||
|
@ -203,6 +203,15 @@ class upload
|
||||
// Only then perform additional image checks.
|
||||
$this->file->move_file($this->storage, false, !$is_image);
|
||||
|
||||
if (count($this->file->error))
|
||||
{
|
||||
$this->file->remove($this->storage);
|
||||
$this->file_data['error'] = array_merge($this->file_data['error'], $this->file->error);
|
||||
$this->file_data['post_attach'] = false;
|
||||
|
||||
return $this->file_data;
|
||||
}
|
||||
|
||||
return $this->file_data;
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,7 @@ class phpbb_attachment_delete_test extends \phpbb_database_test_case
|
||||
$this->filesystem->expects($this->any())
|
||||
->method('exists')
|
||||
->willReturn(true);
|
||||
$adapter = new \phpbb\storage\adapter\local($this->filesystem, new \FastImageSize\FastImageSize(), $phpbb_root_path);
|
||||
$adapter = new \phpbb\storage\adapter\local($this->filesystem, new \FastImageSize\FastImageSize(), new \phpbb\mimetype\guesser(array(new \phpbb\mimetype\extension_guesser)), $phpbb_root_path);
|
||||
$adapter->configure(['path' => 'files']);
|
||||
$adapter_factory_mock = $this->createMock('\phpbb\storage\adapter_factory');
|
||||
$adapter_factory_mock->expects($this->any())
|
||||
|
@ -99,7 +99,7 @@ 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);
|
||||
|
||||
$adapter = new \phpbb\storage\adapter\local($this->filesystem, new \FastImageSize\FastImageSize(), $phpbb_root_path);
|
||||
$adapter = new \phpbb\storage\adapter\local($this->filesystem, new \FastImageSize\FastImageSize(), new \phpbb\mimetype\guesser(array(new \phpbb\mimetype\extension_guesser)), $phpbb_root_path);
|
||||
$adapter->configure(['path' => 'files']);
|
||||
$adapter_factory_mock = $this->createMock('\phpbb\storage\adapter_factory');
|
||||
$adapter_factory_mock->expects($this->any())
|
||||
|
@ -298,7 +298,7 @@ class phpbb_content_visibility_delete_post_test extends phpbb_database_test_case
|
||||
$db = $this->new_dbal();
|
||||
$phpbb_dispatcher = new phpbb_mock_event_dispatcher();
|
||||
|
||||
$adapter = new \phpbb\storage\adapter\local(new \phpbb\filesystem\filesystem(), new \FastImageSize\FastImageSize(), $phpbb_root_path);
|
||||
$adapter = new \phpbb\storage\adapter\local(new \phpbb\filesystem\filesystem(), new \FastImageSize\FastImageSize(), new \phpbb\mimetype\guesser(array(new \phpbb\mimetype\extension_guesser)), $phpbb_root_path);
|
||||
$adapter->configure(['path' => 'files']);
|
||||
$adapter_factory_mock = $this->createMock('\phpbb\storage\adapter_factory');
|
||||
$adapter_factory_mock->expects($this->any())
|
||||
|
@ -35,7 +35,7 @@ class phpbb_functions_user_delete_user_test extends phpbb_database_test_case
|
||||
$phpbb_container = new phpbb_mock_container_builder();
|
||||
$phpbb_container->set('notification_manager', new phpbb_mock_notification_manager());
|
||||
|
||||
$adapter = new \phpbb\storage\adapter\local(new \phpbb\filesystem\filesystem(), new \FastImageSize\FastImageSize(), $phpbb_root_path);
|
||||
$adapter = new \phpbb\storage\adapter\local(new \phpbb\filesystem\filesystem(), new \FastImageSize\FastImageSize(), new \phpbb\mimetype\guesser(array(new \phpbb\mimetype\extension_guesser)), $phpbb_root_path);
|
||||
$adapter->configure(['path' => 'files']);
|
||||
$adapter_factory_mock = $this->createMock('\phpbb\storage\adapter_factory');
|
||||
$adapter_factory_mock->expects($this->any())
|
||||
|
@ -92,7 +92,7 @@ abstract class phpbb_notification_submit_post_base extends phpbb_database_test_c
|
||||
$lang = new \phpbb\language\language(new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx));
|
||||
|
||||
// Storage
|
||||
$adapter = new \phpbb\storage\adapter\local(new \phpbb\filesystem\filesystem(), new \FastImageSize\FastImageSize(), $phpbb_root_path);
|
||||
$adapter = new \phpbb\storage\adapter\local(new \phpbb\filesystem\filesystem(), new \FastImageSize\FastImageSize(), new \phpbb\mimetype\guesser(array(new \phpbb\mimetype\extension_guesser)), $phpbb_root_path);
|
||||
$adapter->configure(['path' => 'files']);
|
||||
$adapter_factory_mock = $this->createMock('\phpbb\storage\adapter_factory');
|
||||
$adapter_factory_mock->expects($this->any())
|
||||
|
@ -92,7 +92,7 @@ class phpbb_privmsgs_delete_user_pms_test extends phpbb_database_test_case
|
||||
$phpbb_container = new phpbb_mock_container_builder();
|
||||
$phpbb_container->set('notification_manager', new phpbb_mock_notification_manager());
|
||||
|
||||
$adapter = new \phpbb\storage\adapter\local(new \phpbb\filesystem\filesystem(), new \FastImageSize\FastImageSize(), $phpbb_root_path);
|
||||
$adapter = new \phpbb\storage\adapter\local(new \phpbb\filesystem\filesystem(), new \FastImageSize\FastImageSize(), new \phpbb\mimetype\guesser(array(new \phpbb\mimetype\extension_guesser)), $phpbb_root_path);
|
||||
$adapter->configure(['path' => 'files']);
|
||||
$adapter_factory_mock = $this->createMock('\phpbb\storage\adapter_factory');
|
||||
$adapter_factory_mock->expects($this->any())
|
||||
|
Loading…
x
Reference in New Issue
Block a user