mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +00:00
[ticket/13502] Also cover passing object to resolver in tests
PHPBB3-13502
This commit is contained in:
parent
91045879df
commit
01d5667388
2 changed files with 7 additions and 1 deletions
|
@ -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'),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -25,4 +25,9 @@ class controller
|
|||
{
|
||||
return new Response('Test_fail', 200);
|
||||
}
|
||||
|
||||
public function __invoke()
|
||||
{
|
||||
$this->handle();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue