1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-13 12:14:06 +02:00

[ticket/13493] Append page name to base url if it doesn't contain it

PHPBB3-13493
This commit is contained in:
Marc Alexander
2015-02-11 13:03:22 +01:00
parent c6a371531b
commit 25b54791f9
3 changed files with 55 additions and 1 deletions

View File

@@ -51,6 +51,11 @@ abstract class phpbb_controller_common_helper_route extends phpbb_test_case
return '/app.php';
}
protected function get_base_uri()
{
return $this->get_uri();
}
protected function get_script_name()
{
return 'app.php';
@@ -66,7 +71,7 @@ abstract class phpbb_controller_common_helper_route extends phpbb_test_case
$this->request = new phpbb_mock_request();
$this->request->overwrite('SCRIPT_NAME', $this->get_uri(), \phpbb\request\request_interface::SERVER);
$this->request->overwrite('SCRIPT_FILENAME', $this->get_script_name(), \phpbb\request\request_interface::SERVER);
$this->request->overwrite('REQUEST_URI', $this->get_uri(), \phpbb\request\request_interface::SERVER);
$this->request->overwrite('REQUEST_URI', $this->get_base_uri(), \phpbb\request\request_interface::SERVER);
$this->request->overwrite('SERVER_NAME', 'localhost', \phpbb\request\request_interface::SERVER);
$this->request->overwrite('SERVER_PORT', '80', \phpbb\request\request_interface::SERVER);