diff options
author | Marc Alexander <admin@m-a-styles.de> | 2013-12-20 18:13:53 +0100 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2013-12-20 18:13:53 +0100 |
commit | 15913fdf79b8e41049e3263e5e27e6690effc65e (patch) | |
tree | 77fbf52ea27c6018ebf2a06851733c325f3fc557 /tests/functional/fixtures | |
parent | 47ea6bc9e61c71f6d54df848b6c61ace052d9e2a (diff) | |
download | forums-15913fdf79b8e41049e3263e5e27e6690effc65e.tar forums-15913fdf79b8e41049e3263e5e27e6690effc65e.tar.gz forums-15913fdf79b8e41049e3263e5e27e6690effc65e.tar.bz2 forums-15913fdf79b8e41049e3263e5e27e6690effc65e.tar.xz forums-15913fdf79b8e41049e3263e5e27e6690effc65e.zip |
[ticket/11997] Move expected redirect returns to controller and output to HTML
The controller will now output the expected redirect returns the same way the
redirect returns are output. The extension controller test will compare those
2 outputs.
PHPBB3-11997
Diffstat (limited to 'tests/functional/fixtures')
-rw-r--r-- | tests/functional/fixtures/ext/foo/bar/controller/controller.php | 61 | ||||
-rw-r--r-- | tests/functional/fixtures/ext/foo/bar/styles/prosilver/template/redirect_body.html | 3 |
2 files changed, 52 insertions, 12 deletions
diff --git a/tests/functional/fixtures/ext/foo/bar/controller/controller.php b/tests/functional/fixtures/ext/foo/bar/controller/controller.php index ebb259af2f..18ec756d3c 100644 --- a/tests/functional/fixtures/ext/foo/bar/controller/controller.php +++ b/tests/functional/fixtures/ext/foo/bar/controller/controller.php @@ -41,23 +41,60 @@ class controller public function redirect() { $redirects = array( - append_sid($this->root_path . 'index.' . $this->php_ext), - append_sid($this->root_path . '../index.' . $this->php_ext), - append_sid($this->root_path . 'tests/index.' . $this->php_ext), - append_sid($this->root_path . '../tests/index.' . $this->php_ext), - $this->helper->url('index'), - $this->helper->url('../index'), - $this->helper->url('../../index'), - $this->helper->url('tests/index'), - $this->helper->url('../tests/index'), - $this->helper->url('../../tests/index'), - $this->helper->url('../tests/../index'), + array( + append_sid($this->root_path . 'index.' . $this->php_ext), + 'index.php', + ), + array( + append_sid($this->root_path . '../index.' . $this->php_ext), + 'index.php', + ), + array( + append_sid($this->root_path . 'tests/index.' . $this->php_ext), + 'tests/index.php', + ), + array( + append_sid($this->root_path . '../tests/index.' . $this->php_ext), + 'tests/index.php', + ), + array( + $this->helper->url('index'), + 'app.php/index', + ), + array( + $this->helper->url('../index'), + 'app.php/index', + ), + array( + $this->helper->url('../../index'), + 'app.php/index', + ), + array( + $this->helper->url('tests/index'), + 'app.php/tests/index', + ), + array( + $this->helper->url('../tests/index'), + 'app.php/tests/index', + ), + array( + $this->helper->url('../../tests/index'), + 'app.php/tests/index', + ), + array( + $this->helper->url('../tests/../index'), + 'app.php/tests/index', + ), ); foreach ($redirects as $redirect) { $this->template->assign_block_vars('redirects', array( - 'URL' => redirect($redirect, true), + 'URL' => redirect($redirect[0], true), + )); + + $this->template->assign_block_vars('redirects_expected', array( + 'URL' => $redirect[1], )); } diff --git a/tests/functional/fixtures/ext/foo/bar/styles/prosilver/template/redirect_body.html b/tests/functional/fixtures/ext/foo/bar/styles/prosilver/template/redirect_body.html index 0c261f10ea..2b70b0fe59 100644 --- a/tests/functional/fixtures/ext/foo/bar/styles/prosilver/template/redirect_body.html +++ b/tests/functional/fixtures/ext/foo/bar/styles/prosilver/template/redirect_body.html @@ -2,4 +2,7 @@ <!-- BEGIN redirects --> <div id="redirect_{redirects.S_ROW_COUNT}">{redirects.URL}</div> <!-- END redirects --> +<!-- BEGIN redirects_expected --> +<div id="redirect_expected_{redirects_expected.S_ROW_COUNT}">{redirects_expected.URL}</div> +<!-- END redirects_expected --> <!-- INCLUDE overall_footer.html --> |