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.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/controller/controller_test.php b/tests/controller/controller_test.php
index 10fced05a2..588adbcfb1 100644
--- a/tests/controller/controller_test.php
+++ b/tests/controller/controller_test.php
@@ -34,10 +34,17 @@ class phpbb_controller_controller_test extends phpbb_test_case
$provider = new \phpbb\controller\provider;
$routes = $provider
->import_paths_from_finder($this->extension_manager->get_finder())
- ->find('./tests/controller/');
+ ->find(__DIR__);
// This will need to be updated if any new routes are defined
- $this->assertEquals(2, sizeof($routes));
+ $this->assertInstanceOf('Symfony\Component\Routing\Route', $routes->get('core_controller'));
+ $this->assertEquals('/core_foo', $routes->get('core_controller')->getPath());
+
+ $this->assertInstanceOf('Symfony\Component\Routing\Route', $routes->get('controller1'));
+ $this->assertEquals('/foo', $routes->get('controller1')->getPath());
+
+ $this->assertInstanceOf('Symfony\Component\Routing\Route', $routes->get('controller2'));
+ $this->assertEquals('/foo/bar', $routes->get('controller2')->getPath());
}
public function test_controller_resolver()