mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
[feature/controller] Add _controller attribute to Request after instantiation
PHPBB3-10864
This commit is contained in:
parent
ac29c7e9d9
commit
79bcbd3691
1 changed files with 4 additions and 2 deletions
|
@ -64,11 +64,13 @@ class phpbb_controller_test extends phpbb_test_case
|
|||
}
|
||||
|
||||
$resolver = new phpbb_controller_resolver(new phpbb_user, $container);
|
||||
$symfony_request = new Request(array(), array(), array('_controller' => 'foo.controller:handle'));
|
||||
$symfony_request = new Request();
|
||||
$symfony_request->attributes->set('_controller', 'foo.controller:handle');
|
||||
|
||||
$this->assertEquals($resolver->getController($symfony_request), array(new phpbb_ext_foo_controller, 'handle'));
|
||||
|
||||
$symfony_request = new Request(array(), array(), array('_controller' => 'core_foo.controller:bar'));
|
||||
$symfony_request = new Request();
|
||||
$symfony_request->attributes->set('_controller', 'core_foo.controller:bar');
|
||||
|
||||
$this->assertEquals($resolver->getController($symfony_request), array(new phpbb_controller_foo, 'bar'));
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue