mirror of
https://github.com/phpbb/phpbb.git
synced 2025-01-17 22:28:46 +01:00
[ticket/13073] Use abstract class for controller helper route tests
PHPBB3-13073
This commit is contained in:
parent
6fd54436ee
commit
543d68a7d3
@ -15,7 +15,7 @@ require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
|
|||||||
|
|
||||||
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
|
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
|
||||||
|
|
||||||
class phpbb_controller_helper_route_test extends phpbb_test_case
|
abstract class phpbb_controller_common_helper_route_test extends phpbb_test_case
|
||||||
{
|
{
|
||||||
protected $root_path;
|
protected $root_path;
|
||||||
|
|
@ -12,9 +12,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
|
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()
|
protected function get_phpbb_root_path()
|
||||||
{
|
{
|
||||||
|
@ -12,9 +12,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
|
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_test extends phpbb_controller_helper_route_test
|
class phpbb_controller_helper_route_adm_test extends phpbb_controller_common_helper_route_test
|
||||||
{
|
{
|
||||||
protected function get_phpbb_root_path()
|
protected function get_phpbb_root_path()
|
||||||
{
|
{
|
||||||
|
33
tests/controller/helper_route_root_test.php
Normal file
33
tests/controller/helper_route_root_test.php
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* This file is part of the phpBB Forum Software package.
|
||||||
|
*
|
||||||
|
* @copyright (c) phpBB Limited <https://www.phpbb.com>
|
||||||
|
* @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__) . '/common_helper_route_test.php';
|
||||||
|
|
||||||
|
class phpbb_controller_helper_route_test extends phpbb_controller_common_helper_route_test
|
||||||
|
{
|
||||||
|
protected function get_phpbb_root_path()
|
||||||
|
{
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function get_uri()
|
||||||
|
{
|
||||||
|
return '/app.php';
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function get_script_name()
|
||||||
|
{
|
||||||
|
return 'app.php';
|
||||||
|
}
|
||||||
|
}
|
@ -12,9 +12,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
|
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_unclean_path_test extends phpbb_controller_helper_route_test
|
class phpbb_controller_helper_route_unclean_path_test extends phpbb_controller_common_helper_route_test
|
||||||
{
|
{
|
||||||
protected function get_phpbb_root_path()
|
protected function get_phpbb_root_path()
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user