From 3f0ce78a25e433287e36bb92ff2c531e5a5b4743 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Thu, 17 Oct 2013 20:49:10 +0200 Subject: [ticket/11930] Fix tests after adding phpbb\path_helper to avatar drivers PHPBB3-11930 --- tests/avatar/manager_test.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'tests/avatar/manager_test.php') diff --git a/tests/avatar/manager_test.php b/tests/avatar/manager_test.php index ba1fb04b33..ccb6a1085c 100644 --- a/tests/avatar/manager_test.php +++ b/tests/avatar/manager_test.php @@ -25,9 +25,17 @@ class phpbb_avatar_manager_test extends PHPUnit_Framework_TestCase $config = new \phpbb\config\config(array()); $request = $this->getMock('\phpbb\request\request'); $cache = $this->getMock('\phpbb\cache\driver\driver_interface'); + $path_helper = new \phpbb\path_helper( + new \phpbb\symfony_request( + new phpbb_mock_request() + ), + new \phpbb\filesystem(), + $this->phpbb_root_path, + $this->phpEx + ); // $this->avatar_foobar will be needed later on - $this->avatar_foobar = $this->getMock('\phpbb\avatar\driver\foobar', array('get_name'), array($config, $phpbb_root_path, $phpEx, $cache)); + $this->avatar_foobar = $this->getMock('\phpbb\avatar\driver\foobar', array('get_name'), array($config, $phpbb_root_path, $phpEx, $cache, $path_helper)); $this->avatar_foobar->expects($this->any()) ->method('get_name') ->will($this->returnValue('avatar.driver.foobar')); @@ -40,7 +48,7 @@ class phpbb_avatar_manager_test extends PHPUnit_Framework_TestCase foreach ($this->avatar_drivers() as $driver) { - $cur_avatar = $this->getMock('\phpbb\avatar\driver\\' . $driver, array('get_name'), array($config, $phpbb_root_path, $phpEx, $cache)); + $cur_avatar = $this->getMock('\phpbb\avatar\driver\\' . $driver, array('get_name'), array($config, $phpbb_root_path, $phpEx, $cache, $path_helper)); $cur_avatar->expects($this->any()) ->method('get_name') ->will($this->returnValue('avatar.driver.' . $driver)); -- cgit v1.2.1