mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 22:10:45 +02:00
[feature/avatars] Remove $request property and pass as argument if needed
Remove the $request property from the phpbb_avatar_driver class and rather pass it as function argument if it's needed in a function. Currently this is only the case for the class methods prepare_form() and process_form(). PHPBB3-10018
This commit is contained in:
@@ -26,12 +26,12 @@ class phpbb_avatar_manager_test extends PHPUnit_Framework_TestCase
|
||||
$config = new phpbb_config(array());
|
||||
$request = $this->getMock('phpbb_request');
|
||||
$cache = $this->getMock('phpbb_cache_driver_interface');
|
||||
$this->avatar_foobar = $this->getMock('phpbb_avatar_driver_foobar', array('get_name'), array($config, $request, $phpbb_root_path, $phpEx, $cache));
|
||||
$this->avatar_foobar = $this->getMock('phpbb_avatar_driver_foobar', array('get_name'), array($config, $phpbb_root_path, $phpEx, $cache));
|
||||
$this->avatar_foobar->expects($this->any())
|
||||
->method('get_name')
|
||||
->will($this->returnValue('avatar.driver.foobar'));
|
||||
$avatar_drivers = array($this->avatar_foobar);
|
||||
$config['allow_avatar_' . get_class($this->avatar_foobar)] = true;
|
||||
$config['allow_avatar_' . get_class($this->avatar_foobar)] = true;
|
||||
|
||||
// Set up avatar manager
|
||||
$this->manager = new phpbb_avatar_manager($config, $avatar_drivers, $this->phpbb_container);
|
||||
|
Reference in New Issue
Block a user