aboutsummaryrefslogtreecommitdiffstats
path: root/tests/controller/controller_test.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/controller/controller_test.php')
-rw-r--r--tests/controller/controller_test.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/controller/controller_test.php b/tests/controller/controller_test.php
index cd90dda751..354a902831 100644
--- a/tests/controller/controller_test.php
+++ b/tests/controller/controller_test.php
@@ -30,13 +30,18 @@ class phpbb_controller_controller_test extends phpbb_test_case
'ext_active' => '1',
'ext_path' => 'ext/vendor2/foo/',
),
+ 'vendor2/bar' => array(
+ 'ext_name' => 'vendor2/bar',
+ 'ext_active' => '1',
+ 'ext_path' => 'ext/vendor2/bar/',
+ ),
));
}
public function test_router_find_files()
{
- $router = new \phpbb\routing\router($this->extension_manager, dirname(__FILE__) . '/', 'php');
- $router->find_routing_files($this->extension_manager->get_finder());
+ $router = new \phpbb\routing\router($this->extension_manager, dirname(__FILE__) . '/', 'php', PHPBB_ENVIRONMENT);
+ $router->find_routing_files($this->extension_manager->all_enabled());
$routes = $router->find(__DIR__)->get_routes();
// This will need to be updated if any new routes are defined
@@ -49,6 +54,9 @@ class phpbb_controller_controller_test extends phpbb_test_case
$this->assertInstanceOf('Symfony\Component\Routing\Route', $routes->get('controller2'));
$this->assertEquals('/foo/bar', $routes->get('controller2')->getPath());
+ $this->assertInstanceOf('Symfony\Component\Routing\Route', $routes->get('controller3'));
+ $this->assertEquals('/bar', $routes->get('controller3')->getPath());
+
$this->assertNull($routes->get('controller_noroute'));
}