diff options
author | Nathan Guse <nathaniel.guse@gmail.com> | 2014-03-10 20:50:08 -0500 |
---|---|---|
committer | Nathan Guse <nathaniel.guse@gmail.com> | 2014-03-10 20:50:08 -0500 |
commit | f7020fb5d1368020cf780deaeba56fee56e3dcfa (patch) | |
tree | 66f95cb75cf7c892c9ccebc830a654c3a896086e /tests/functional | |
parent | 235f7c3721f792e0f732ed086e1118a2f08e37a6 (diff) | |
parent | 0119a21862bc433b50fe3914e3bae6f12f61129c (diff) | |
download | forums-f7020fb5d1368020cf780deaeba56fee56e3dcfa.tar forums-f7020fb5d1368020cf780deaeba56fee56e3dcfa.tar.gz forums-f7020fb5d1368020cf780deaeba56fee56e3dcfa.tar.bz2 forums-f7020fb5d1368020cf780deaeba56fee56e3dcfa.tar.xz forums-f7020fb5d1368020cf780deaeba56fee56e3dcfa.zip |
Merge pull request #2092 from nickvergessen/ticket/12090
[ticket/12090] Pass route name to url() instead of the url itself
Diffstat (limited to 'tests/functional')
-rw-r--r-- | tests/functional/fixtures/ext/foo/bar/config/routing.yml | 12 | ||||
-rw-r--r-- | tests/functional/fixtures/ext/foo/bar/controller/controller.php | 31 |
2 files changed, 17 insertions, 26 deletions
diff --git a/tests/functional/fixtures/ext/foo/bar/config/routing.yml b/tests/functional/fixtures/ext/foo/bar/config/routing.yml index 9b1ce3cfd7..d4d256c293 100644 --- a/tests/functional/fixtures/ext/foo/bar/config/routing.yml +++ b/tests/functional/fixtures/ext/foo/bar/config/routing.yml @@ -17,3 +17,15 @@ foo_exception_controller: foo_redirect_controller: pattern: /foo/redirect defaults: { _controller: foo_bar.controller:redirect } + +foo_index_controller: + pattern: /index + defaults: { _controller: foo_bar.controller:redirect } + +foo_tests_index_controller: + pattern: /tests/index + defaults: { _controller: foo_bar.controller:redirect } + +foo_tests_dotdot_index_controller: + pattern: /tests/../index + defaults: { _controller: foo_bar.controller:redirect } diff --git a/tests/functional/fixtures/ext/foo/bar/controller/controller.php b/tests/functional/fixtures/ext/foo/bar/controller/controller.php index 558b202948..45246f8a97 100644 --- a/tests/functional/fixtures/ext/foo/bar/controller/controller.php +++ b/tests/functional/fixtures/ext/foo/bar/controller/controller.php @@ -63,40 +63,19 @@ class controller 'tests/index.php', ), array( - $this->helper->url('index'), + $this->helper->route('foo_index_controller'), $rewrite_prefix . 'index', ), array( - $this->helper->url('tests/index'), + $this->helper->route('foo_tests_index_controller'), $rewrite_prefix . 'tests/index', ), + /** + * Symfony does not allow /../ in routes array( - $this->helper->url('tests/../index'), + $this->helper->route('foo_tests_dotdot_index_controller'), $rewrite_prefix . 'index', ), - /* - // helper URLs starting with ../ are prone to failure. - // Do not test them right now. - array( - $this->helper->url('../index'), - '../index', - ), - array( - $this->helper->url('../../index'), - '../index', - ), - array( - $this->helper->url('../tests/index'), - $rewrite_prefix . '../tests/index', - ), - array( - $this->helper->url('../tests/../index'), - '../index', - ), - array( - $this->helper->url('../../tests/index'), - '../tests/index', - ), */ ); |