aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Darricau <tristan.darricau@sensiolabs.com>2016-02-07 15:15:01 +0100
committerTristan Darricau <tristan.darricau@sensiolabs.com>2016-02-07 15:15:01 +0100
commit20d85433fcba5dd892a7f82b8be2bac34546536f (patch)
tree09aa2bd5c26e07de40536cedea6ca151b45d04c8
parent7ec6dd75f388bf449016d78e39c93d3c13f99e69 (diff)
downloadforums-20d85433fcba5dd892a7f82b8be2bac34546536f.tar
forums-20d85433fcba5dd892a7f82b8be2bac34546536f.tar.gz
forums-20d85433fcba5dd892a7f82b8be2bac34546536f.tar.bz2
forums-20d85433fcba5dd892a7f82b8be2bac34546536f.tar.xz
forums-20d85433fcba5dd892a7f82b8be2bac34546536f.zip
[ticket/14440] Add tests
PHPBB3-14440
-rw-r--r--tests/path_helper/path_helper_test.php37
1 files changed, 37 insertions, 0 deletions
diff --git a/tests/path_helper/path_helper_test.php b/tests/path_helper/path_helper_test.php
index 007441bc92..49dd40fbec 100644
--- a/tests/path_helper/path_helper_test.php
+++ b/tests/path_helper/path_helper_test.php
@@ -135,6 +135,43 @@ class phpbb_path_helper_test extends phpbb_test_case
'/phpbb3-fork/phpBB/app.php',
'./../',
),
+
+ // No correction if the path is already prepend by the web root path
+ array(
+ './../' . $this->phpbb_root_path . 'test.php',
+ '//',
+ null,
+ null,
+ '',
+ ),
+ array(
+ './../' . $this->phpbb_root_path . 'test.php',
+ '//',
+ 'foo/bar.php',
+ 'bar.php',
+ '',
+ ),
+ array(
+ './../../' . $this->phpbb_root_path . 'test.php',
+ '/foo/template',
+ '/phpbb3-fork/phpBB/app.php/foo/template',
+ '/phpbb3-fork/phpBB/app.php',
+ '',
+ ),
+ array(
+ './../' . $this->phpbb_root_path . 'test.php',
+ '/foo/template',
+ '/phpbb3-fork/phpBB/foo/template',
+ '/phpbb3-fork/phpBB/app.php',
+ '',
+ ),
+ array(
+ './../'.$this->phpbb_root_path . 'test.php',
+ '/',
+ '/phpbb3-fork/phpBB/app.php/',
+ '/phpbb3-fork/phpBB/app.php',
+ '',
+ ),
);
}