aboutsummaryrefslogtreecommitdiffstats
path: root/tests/mock
diff options
context:
space:
mode:
authorTristan Darricau <github@nicofuma.fr>2014-05-03 14:00:47 +0200
committerTristan Darricau <github@nicofuma.fr>2014-05-03 14:00:47 +0200
commit8d9133a30e576d9f4315bc914b56c7be5481ebf4 (patch)
tree5bc5afef2e520f5af518f241f98303027e245c3e /tests/mock
parent0d893d65eb2823aae449a9201941798e450a9be1 (diff)
downloadforums-8d9133a30e576d9f4315bc914b56c7be5481ebf4.tar
forums-8d9133a30e576d9f4315bc914b56c7be5481ebf4.tar.gz
forums-8d9133a30e576d9f4315bc914b56c7be5481ebf4.tar.bz2
forums-8d9133a30e576d9f4315bc914b56c7be5481ebf4.tar.xz
forums-8d9133a30e576d9f4315bc914b56c7be5481ebf4.zip
[ticket/11497] Use a mock object to define the root folder for the finder
PHPBB3-11497
Diffstat (limited to 'tests/mock')
-rw-r--r--tests/mock/controller_helper.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/mock/controller_helper.php b/tests/mock/controller_helper.php
new file mode 100644
index 0000000000..c53d7265c4
--- /dev/null
+++ b/tests/mock/controller_helper.php
@@ -0,0 +1,22 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2011 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+class phpbb_mock_controller_helper extends \phpbb\controller\helper
+{
+ public function __construct(\phpbb\template\template $template, \phpbb\user $user, \phpbb\config\config $config, \phpbb\controller\provider $provider, \phpbb\extension\manager $manager, $phpbb_root_path, $php_ext, $phpbb_root_path_ext)
+ {
+ $this->template = $template;
+ $this->user = $user;
+ $this->config = $config;
+ $this->phpbb_root_path = $phpbb_root_path;
+ $this->php_ext = $php_ext;
+ $provider->set_ext_finder($manager->get_finder());
+ $this->route_collection = $provider->find($phpbb_root_path_ext)->get_routes();
+ }
+}