aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Darricau <github@nicofuma.fr>2014-11-19 20:54:14 +0100
committerTristan Darricau <github@nicofuma.fr>2014-11-20 21:13:26 +0100
commit48950be82bca0c85347f5aa1585de44c369780c6 (patch)
tree185f3117d1375ed64bd720eed5bf9bc4ecd592c7
parentac0ff219c61bd187dd3fbde5b6808624bd8ef077 (diff)
downloadforums-48950be82bca0c85347f5aa1585de44c369780c6.tar
forums-48950be82bca0c85347f5aa1585de44c369780c6.tar.gz
forums-48950be82bca0c85347f5aa1585de44c369780c6.tar.bz2
forums-48950be82bca0c85347f5aa1585de44c369780c6.tar.xz
forums-48950be82bca0c85347f5aa1585de44c369780c6.zip
[ticket/12620] Fix tests
PHPBB3-12620
-rw-r--r--phpBB/config/development/routing/environment.yml2
-rw-r--r--phpBB/config/production/routing/environment.yml2
-rw-r--r--phpBB/config/test/routing/environment.yml2
-rw-r--r--phpBB/includes/functions_install.php10
-rw-r--r--phpBB/includes/functions_url_matcher.php8
5 files changed, 10 insertions, 14 deletions
diff --git a/phpBB/config/development/routing/environment.yml b/phpBB/config/development/routing/environment.yml
index 9ee3e5ae3a..0cddfb7521 100644
--- a/phpBB/config/development/routing/environment.yml
+++ b/phpBB/config/development/routing/environment.yml
@@ -1,2 +1,2 @@
core.default:
- resource: "../default/routing.yml"
+ resource: "../../default/routing/routing.yml"
diff --git a/phpBB/config/production/routing/environment.yml b/phpBB/config/production/routing/environment.yml
index 9ee3e5ae3a..0cddfb7521 100644
--- a/phpBB/config/production/routing/environment.yml
+++ b/phpBB/config/production/routing/environment.yml
@@ -1,2 +1,2 @@
core.default:
- resource: "../default/routing.yml"
+ resource: "../../default/routing/routing.yml"
diff --git a/phpBB/config/test/routing/environment.yml b/phpBB/config/test/routing/environment.yml
index 9ee3e5ae3a..0cddfb7521 100644
--- a/phpBB/config/test/routing/environment.yml
+++ b/phpBB/config/test/routing/environment.yml
@@ -1,2 +1,2 @@
core.default:
- resource: "../default/routing.yml"
+ resource: "../../default/routing/routing.yml"
diff --git a/phpBB/includes/functions_install.php b/phpBB/includes/functions_install.php
index cdd9c7864b..ef4e3166e3 100644
--- a/phpBB/includes/functions_install.php
+++ b/phpBB/includes/functions_install.php
@@ -450,15 +450,7 @@ function phpbb_create_config_file_data($data, $dbms, $debug = false, $debug_cont
$config_data .= "\n@define('PHPBB_INSTALLED', true);\n";
$config_data .= "// @define('PHPBB_DISPLAY_LOAD_TIME', true);\n";
-
- if ($debug)
- {
- $config_data .= "@define('PHPBB_ENVIRONMENT', 'development');\n";
- }
- else
- {
- $config_data .= "@define('PHPBB_ENVIRONMENT', 'production');\n";
- }
+ $config_data .= "@define('PHPBB_ENVIRONMENT', 'test');\n";
if ($debug_container)
{
diff --git a/phpBB/includes/functions_url_matcher.php b/phpBB/includes/functions_url_matcher.php
index 448f1b19a2..19aebd1fbc 100644
--- a/phpBB/includes/functions_url_matcher.php
+++ b/phpBB/includes/functions_url_matcher.php
@@ -55,7 +55,9 @@ function phpbb_get_url_matcher(\phpbb\extension\manager $manager, RequestContext
*/
function phpbb_create_dumped_url_matcher(\phpbb\extension\manager $manager, $root_path, $config_cache)
{
- $provider = new \phpbb\controller\provider($root_path);
+ global $phpbb_container;
+
+ $provider = new \phpbb\controller\provider($phpbb_container->getParameter('core.environment'), $root_path);
$provider->find_routing_files($manager->all_enabled());
$routes = $provider->find()->get_routes();
$dumper = new PhpMatcherDumper($routes);
@@ -75,7 +77,9 @@ function phpbb_create_dumped_url_matcher(\phpbb\extension\manager $manager, $roo
*/
function phpbb_create_url_matcher(\phpbb\extension\manager $manager, RequestContext $context, $root_path)
{
- $provider = new \phpbb\controller\provider($root_path);
+ global $phpbb_container;
+
+ $provider = new \phpbb\controller\provider($phpbb_container->getParameter('core.environment'), $root_path);
$provider->find_routing_files($manager->all_enabled());
$routes = $provider->find()->get_routes();
return new UrlMatcher($routes, $context);