aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/controller/controller_test.php3
-rw-r--r--tests/controller/ext/vendor2/foo/controller.php5
2 files changed, 7 insertions, 1 deletions
diff --git a/tests/controller/controller_test.php b/tests/controller/controller_test.php
index 8bd7bf678c..d921d0eade 100644
--- a/tests/controller/controller_test.php
+++ b/tests/controller/controller_test.php
@@ -104,9 +104,10 @@ class phpbb_controller_controller_test extends phpbb_test_case
return array(
array(array(new foo\controller(), 'handle2'), array('foo', 0)),
array(array(new foo\controller(), 'handle_fail'), array('default'), array('no_default' => 'default')),
+ array(new foo\controller(), array(), array()),
array(array(new foo\controller(), 'handle_fail'), array(), array(), '\phpbb\controller\exception', 'CONTROLLER_ARGUMENT_VALUE_MISSING'),
array('', array(), array(), '\ReflectionException', 'Function () does not exist'),
- array(new foo\controller(), array(), array(), '\ReflectionException', 'Method __invoke does not exist'),
+ array(new phpbb\controller\foo, array(), array(), '\ReflectionException', 'Method __invoke does not exist'),
);
}
diff --git a/tests/controller/ext/vendor2/foo/controller.php b/tests/controller/ext/vendor2/foo/controller.php
index b2c3df616c..cabcae042b 100644
--- a/tests/controller/ext/vendor2/foo/controller.php
+++ b/tests/controller/ext/vendor2/foo/controller.php
@@ -25,4 +25,9 @@ class controller
{
return new Response('Test_fail', 200);
}
+
+ public function __invoke()
+ {
+ $this->handle();
+ }
}