From 023d7a972dd5c279e0b0b24801f9e53e7865d39a Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Mon, 7 Jan 2013 22:49:48 +0100 Subject: [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 --- tests/avatar/driver/foobar.php | 6 +++--- tests/avatar/manager_test.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'tests/avatar') diff --git a/tests/avatar/driver/foobar.php b/tests/avatar/driver/foobar.php index fd4e452818..a68d0aa6c6 100644 --- a/tests/avatar/driver/foobar.php +++ b/tests/avatar/driver/foobar.php @@ -7,13 +7,13 @@ class phpbb_avatar_driver_foobar extends phpbb_avatar_driver return array(); } - public function prepare_form($template, $row, &$error) + public function prepare_form($request, $template, $row, &$error) { return false; } - public function process_form($template, $row, &$error) + public function process_form($request, $template, $row, &$error) { return false; } -} \ No newline at end of file +} diff --git a/tests/avatar/manager_test.php b/tests/avatar/manager_test.php index b910db59ee..fd7132ea82 100644 --- a/tests/avatar/manager_test.php +++ b/tests/avatar/manager_test.php @@ -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); -- cgit v1.2.1