1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-09 18:26:32 +02:00

[ticket/15692] Update tests

PHPBB3-15692
This commit is contained in:
Rubén Calvo
2018-08-07 00:23:47 +02:00
parent 5fbe929a1d
commit d0b7875b18
5 changed files with 9 additions and 47 deletions

View File

@@ -30,25 +30,16 @@ class phpbb_avatar_manager_test extends \phpbb_database_test_case
global $phpbb_root_path, $phpEx;
// Mock phpbb_container
$cache = $this->createMock('\phpbb\cache\driver\driver_interface');
$phpbb_container = $this->createMock('Symfony\Component\DependencyInjection\ContainerInterface');
$phpbb_container->expects($this->any())
->method('get')
->will($this->returnArgument(0));
$filesystem = new \phpbb\filesystem\filesystem();
$adapter = new \phpbb\storage\adapter\local($filesystem, new \FastImageSize\FastImageSize(), new \phpbb\mimetype\guesser(array(new \phpbb\mimetype\extension_guesser)), $phpbb_root_path);
$adapter->configure(['path' => 'images/avatars/upload']);
$db = $this->createMock('\phpbb\db\driver\driver_interface');
$adapter_factory_mock = $this->createMock('\phpbb\storage\adapter_factory');
$adapter_factory_mock->expects($this->any())
->method('get')
->willReturn($adapter);
$storage = new \phpbb\storage\storage($db, $cache, $adapter_factory_mock, '', '');
$storage = $this->createMock('\phpbb\storage\storage');
// Prepare dependencies for avatar manager and driver
$this->config = new \phpbb\config\config(array());
$cache = $this->createMock('\phpbb\cache\driver\driver_interface');
$path_helper = new \phpbb\path_helper(
new \phpbb\symfony_request(
new phpbb_mock_request()