diff options
-rw-r--r-- | phpBB/includes/controller/helper.php | 2 | ||||
-rw-r--r-- | tests/controller/controller_test.php | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/phpBB/includes/controller/helper.php b/phpBB/includes/controller/helper.php index 2098f51edf..0e64829874 100644 --- a/phpBB/includes/controller/helper.php +++ b/phpBB/includes/controller/helper.php @@ -55,7 +55,7 @@ class phpbb_controller_helper * @param string $phpbb_root_path phpBB root path * @param string $php_ext PHP extension */ - public function __construct(phpbb_template $template, phpbb_user $user, $phpbb_root_path, $php_ext) + public function __construct(phpbb_template $template = null, phpbb_user $user = null, $phpbb_root_path = './', $php_ext = '.php') { $this->template = $template; $this->user = $user; diff --git a/tests/controller/controller_test.php b/tests/controller/controller_test.php index 198fb3c6dd..97f6d6152a 100644 --- a/tests/controller/controller_test.php +++ b/tests/controller/controller_test.php @@ -40,6 +40,12 @@ class phpbb_controller_test extends phpbb_test_case $this->assertEquals(2, sizeof($routes)); } + public function test_controller_url_helper() + { + $helper = new phpbb_controller_helper; + $this->assertEquals($helper->url('foo/bar'),'./app.php?controller=foo/bar'); + } + public function test_controller_resolver() { $container = new ContainerBuilder(); |