aboutsummaryrefslogtreecommitdiffstats
path: root/tests/functional/fixtures/ext/foo/bar/controller/controller.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/functional/fixtures/ext/foo/bar/controller/controller.php')
-rw-r--r--tests/functional/fixtures/ext/foo/bar/controller/controller.php35
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/functional/fixtures/ext/foo/bar/controller/controller.php b/tests/functional/fixtures/ext/foo/bar/controller/controller.php
new file mode 100644
index 0000000000..5a91b5f681
--- /dev/null
+++ b/tests/functional/fixtures/ext/foo/bar/controller/controller.php
@@ -0,0 +1,35 @@
+<?php
+use Symfony\Component\HttpFoundation\Response;
+
+class phpbb_ext_foo_bar_controller
+{
+ protected $template;
+
+ public function __construct(phpbb_controller_helper $helper, phpbb_template $template)
+ {
+ $this->template = $template;
+ $this->helper = $helper;
+ }
+
+ public function handle()
+ {
+ return new Response('foo/bar controller handle() method', 200);
+ }
+
+ public function baz($test)
+ {
+ return new Response('Value of "test" URL argument is: ' . $test);
+ }
+
+ public function template()
+ {
+ $this->template->assign_var('A_VARIABLE', 'I am a variable');
+
+ return $this->helper->render('foo_bar_body.html');
+ }
+
+ public function exception()
+ {
+ throw new phpbb_controller_exception('Exception thrown from foo/exception route');
+ }
+}