From 3cc2e619d2a3293aebfdef06f6298a71648112b1 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Sat, 19 Oct 2013 12:11:09 +0200 Subject: [ticket/11948] Add second routing file to tests PHPBB3-11948 --- tests/controller/controller_test.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/controller/controller_test.php') diff --git a/tests/controller/controller_test.php b/tests/controller/controller_test.php index 10fced05a2..0e7cac05ec 100644 --- a/tests/controller/controller_test.php +++ b/tests/controller/controller_test.php @@ -37,7 +37,7 @@ class phpbb_controller_controller_test extends phpbb_test_case ->find('./tests/controller/'); // This will need to be updated if any new routes are defined - $this->assertEquals(2, sizeof($routes)); + $this->assertEquals(3, sizeof($routes)); } public function test_controller_resolver() -- cgit v1.2.1 From 51561ed538450d0e3d8392f3073004751e0b03f1 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 21 Oct 2013 21:52:48 +0200 Subject: [ticket/11948] Allow resource importing for routing PHPBB3-11948 --- tests/controller/controller_test.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/controller/controller_test.php') diff --git a/tests/controller/controller_test.php b/tests/controller/controller_test.php index 0e7cac05ec..c71fc92170 100644 --- a/tests/controller/controller_test.php +++ b/tests/controller/controller_test.php @@ -34,7 +34,7 @@ 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(3, sizeof($routes)); -- cgit v1.2.1 From 96317b2c4518976c683dd67f38a8a6f8faabdf15 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 21 Oct 2013 22:18:03 +0200 Subject: [ticket/11948] Check actual result of routes PHPBB3-11948 --- tests/controller/controller_test.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'tests/controller/controller_test.php') diff --git a/tests/controller/controller_test.php b/tests/controller/controller_test.php index c71fc92170..588adbcfb1 100644 --- a/tests/controller/controller_test.php +++ b/tests/controller/controller_test.php @@ -37,7 +37,14 @@ class phpbb_controller_controller_test extends phpbb_test_case ->find(__DIR__); // This will need to be updated if any new routes are defined - $this->assertEquals(3, 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() -- cgit v1.2.1