1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

[ticket/11497] Use a mock object to define the root folder for the finder

PHPBB3-11497
This commit is contained in:
Tristan Darricau
2014-05-03 14:00:47 +02:00
parent 0d893d65eb
commit 8d9133a30e
3 changed files with 25 additions and 3 deletions

View File

@@ -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();
}
}