From a6d9b42e5fa3912b3a559c7e2068e74d4927438a Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Fri, 19 Sep 2014 00:35:17 +0200 Subject: [ticket/13073] Rework route tests and add tests for more directory types PHPBB3-13073 --- tests/controller/helper_route_adm_subdir_test.php | 33 +++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 tests/controller/helper_route_adm_subdir_test.php (limited to 'tests/controller/helper_route_adm_subdir_test.php') diff --git a/tests/controller/helper_route_adm_subdir_test.php b/tests/controller/helper_route_adm_subdir_test.php new file mode 100644 index 0000000000..783797f86a --- /dev/null +++ b/tests/controller/helper_route_adm_subdir_test.php @@ -0,0 +1,33 @@ + +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file. +* +*/ + +require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php'; +require_once dirname(__FILE__) . '/helper_route_test.php'; + +class phpbb_controller_helper_route_adm_test extends phpbb_controller_helper_route_test +{ + protected function get_phpbb_root_path() + { + return './../../'; + } + + protected function get_uri() + { + return '/adm/subdir/index.php'; + } + + protected function get_script_name() + { + return 'index.php'; + } +} -- cgit v1.2.1 From de7ed7c286968895169252ef477faffd1123a05b Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Fri, 19 Sep 2014 12:01:31 +0200 Subject: [ticket/13073] Use correct class names in test files PHPBB3-13073 --- tests/controller/helper_route_adm_subdir_test.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/controller/helper_route_adm_subdir_test.php') diff --git a/tests/controller/helper_route_adm_subdir_test.php b/tests/controller/helper_route_adm_subdir_test.php index 783797f86a..b173794f7a 100644 --- a/tests/controller/helper_route_adm_subdir_test.php +++ b/tests/controller/helper_route_adm_subdir_test.php @@ -14,7 +14,7 @@ require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php'; require_once dirname(__FILE__) . '/helper_route_test.php'; -class phpbb_controller_helper_route_adm_test extends phpbb_controller_helper_route_test +class phpbb_controller_helper_route_adm_subdir_test extends phpbb_controller_helper_route_test { protected function get_phpbb_root_path() { -- cgit v1.2.1 From 543d68a7d37c750b629d96961139bb55a1a45a26 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Fri, 19 Sep 2014 15:21:04 +0200 Subject: [ticket/13073] Use abstract class for controller helper route tests PHPBB3-13073 --- tests/controller/helper_route_adm_subdir_test.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/controller/helper_route_adm_subdir_test.php') diff --git a/tests/controller/helper_route_adm_subdir_test.php b/tests/controller/helper_route_adm_subdir_test.php index b173794f7a..02ff687be0 100644 --- a/tests/controller/helper_route_adm_subdir_test.php +++ b/tests/controller/helper_route_adm_subdir_test.php @@ -12,9 +12,9 @@ */ require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php'; -require_once dirname(__FILE__) . '/helper_route_test.php'; +require_once dirname(__FILE__) . '/common_helper_route_test.php'; -class phpbb_controller_helper_route_adm_subdir_test extends phpbb_controller_helper_route_test +class phpbb_controller_helper_route_adm_subdir_test extends phpbb_controller_common_helper_route_test { protected function get_phpbb_root_path() { -- cgit v1.2.1 From 3418683cfcfd99235c680e28c60f066c3b36915a Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Fri, 19 Sep 2014 16:50:26 +0200 Subject: [ticket/13073] Remove _test suffix from common test class PHPBB3-13073 --- tests/controller/helper_route_adm_subdir_test.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/controller/helper_route_adm_subdir_test.php') diff --git a/tests/controller/helper_route_adm_subdir_test.php b/tests/controller/helper_route_adm_subdir_test.php index 02ff687be0..f27ac81b04 100644 --- a/tests/controller/helper_route_adm_subdir_test.php +++ b/tests/controller/helper_route_adm_subdir_test.php @@ -12,9 +12,9 @@ */ require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php'; -require_once dirname(__FILE__) . '/common_helper_route_test.php'; +require_once dirname(__FILE__) . '/common_helper_route.php'; -class phpbb_controller_helper_route_adm_subdir_test extends phpbb_controller_common_helper_route_test +class phpbb_controller_helper_route_adm_subdir_test extends phpbb_controller_common_helper_route { protected function get_phpbb_root_path() { -- cgit v1.2.1