diff options
Diffstat (limited to 'tests/functional/extension_controller_test.php')
-rw-r--r-- | tests/functional/extension_controller_test.php | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/functional/extension_controller_test.php b/tests/functional/extension_controller_test.php index 37752b8fbb..ab90223c48 100644 --- a/tests/functional/extension_controller_test.php +++ b/tests/functional/extension_controller_test.php @@ -111,4 +111,35 @@ class phpbb_functional_extension_controller_test extends phpbb_functional_test_c $this->assert_response_html(404); $this->assertContains('No route found for "GET /does/not/exist"', $crawler->filter('body')->text()); } + + /** + * Check the output of a controller using the template system + */ + public function test_redirect() + { + $filesystem = new \phpbb\filesystem(); + $this->phpbb_extension_manager->enable('foo/bar'); + $crawler = self::request('GET', 'app.php/foo/redirect'); + + $test_redirects = array( + 'index.php', + 'index.php', + 'tests/index.php', + 'tests/index.php', + 'app.php/index', + 'app.php/index', + 'app.php/index', + 'app.php/tests/index', + 'app.php/tests/index', + 'app.php/tests/index', + 'app.php/tests/index', + ); + + foreach ($test_redirects as $row_num => $redirect) + { + $this->assertContains($filesystem->clean_path(self::$root_url) . $redirect, $crawler->filter('#redirect_' . $row_num)->text()); + } + + $this->phpbb_extension_manager->purge('foo/bar'); + } } |