diff options
| author | Marc Alexander <admin@m-a-styles.de> | 2014-09-19 00:35:17 +0200 |
|---|---|---|
| committer | Marc Alexander <admin@m-a-styles.de> | 2014-09-19 00:35:17 +0200 |
| commit | a6d9b42e5fa3912b3a559c7e2068e74d4927438a (patch) | |
| tree | 4a9b64ac198df8c2a5b9c853affbda0344b17686 /tests/controller/helper_route_adm_test.php | |
| parent | d74f45aee0164d6189c3bb4182d67f345b1d9d6e (diff) | |
| download | forums-a6d9b42e5fa3912b3a559c7e2068e74d4927438a.tar forums-a6d9b42e5fa3912b3a559c7e2068e74d4927438a.tar.gz forums-a6d9b42e5fa3912b3a559c7e2068e74d4927438a.tar.bz2 forums-a6d9b42e5fa3912b3a559c7e2068e74d4927438a.tar.xz forums-a6d9b42e5fa3912b3a559c7e2068e74d4927438a.zip | |
[ticket/13073] Rework route tests and add tests for more directory types
PHPBB3-13073
Diffstat (limited to 'tests/controller/helper_route_adm_test.php')
| -rw-r--r-- | tests/controller/helper_route_adm_test.php | 45 |
1 files changed, 10 insertions, 35 deletions
diff --git a/tests/controller/helper_route_adm_test.php b/tests/controller/helper_route_adm_test.php index ec7fc0c490..079f779dbf 100644 --- a/tests/controller/helper_route_adm_test.php +++ b/tests/controller/helper_route_adm_test.php @@ -14,45 +14,20 @@ require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php'; require_once dirname(__FILE__) . '/helper_route_test.php'; -use Symfony\Component\Routing\Generator\UrlGeneratorInterface; - class phpbb_controller_helper_route_adm_test extends phpbb_controller_helper_route_test { - public function setUp() + protected function get_phpbb_root_path() { - global $phpbb_dispatcher, $phpbb_root_path, $phpEx; - - parent::setUp(); - - $request = new phpbb_mock_request(); - $request->overwrite('SCRIPT_NAME', '/adm/index.php', \phpbb\request\request_interface::SERVER); - $request->overwrite('SCRIPT_FILENAME', 'index.php', \phpbb\request\request_interface::SERVER); - $request->overwrite('REQUEST_URI', '/adm/index.php', \phpbb\request\request_interface::SERVER); - $request->overwrite('SERVER_NAME', 'localhost', \phpbb\request\request_interface::SERVER); - $request->overwrite('SERVER_PORT', '80', \phpbb\request\request_interface::SERVER); + return './../'; + } - $this->symfony_request = new \phpbb\symfony_request( - $request - ); - $this->filesystem = new \phpbb\filesystem(); - $phpbb_path_helper = new \phpbb\path_helper( - $this->symfony_request, - $this->filesystem, - $this->getMock('\phpbb\request\request'), - $phpbb_root_path, - $phpEx - ); + protected function get_uri() + { + return '/adm/index.php'; + } - $finder = new \phpbb\finder( - new \phpbb\filesystem(), - dirname(__FILE__) . '/', - new phpbb_mock_cache() - ); - $finder->set_extensions(array_keys($this->extension_manager->all_enabled())); - $this->provider = new \phpbb\controller\provider(); - $this->provider->find_routing_files($finder); - $this->provider->find(dirname(__FILE__) . '/'); - // Set correct current phpBB root path - $this->root_path = './../'; + protected function get_script_name() + { + return 'index.php'; } } |
