aboutsummaryrefslogtreecommitdiffstats
path: root/tests/extension/finder_test.php
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2013-03-12 22:45:44 +0100
committerJoas Schilling <nickvergessen@gmx.de>2013-03-12 22:45:44 +0100
commit1fd5be859e3fe85e67fe7f5632e4630b96ca3634 (patch)
tree0ead5fc1191b1642a0197b3281433f2da05f8e8a /tests/extension/finder_test.php
parent567eefb2bd2bf280391786ea171dad0bdb0b442d (diff)
downloadforums-1fd5be859e3fe85e67fe7f5632e4630b96ca3634.tar
forums-1fd5be859e3fe85e67fe7f5632e4630b96ca3634.tar.gz
forums-1fd5be859e3fe85e67fe7f5632e4630b96ca3634.tar.bz2
forums-1fd5be859e3fe85e67fe7f5632e4630b96ca3634.tar.xz
forums-1fd5be859e3fe85e67fe7f5632e4630b96ca3634.zip
[ticket/11362] Add unit test for ../ in directory paths
PHPBB3-11362
Diffstat (limited to 'tests/extension/finder_test.php')
-rw-r--r--tests/extension/finder_test.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/extension/finder_test.php b/tests/extension/finder_test.php
index c96b11a73c..3781591b19 100644
--- a/tests/extension/finder_test.php
+++ b/tests/extension/finder_test.php
@@ -6,6 +6,7 @@
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
class phpbb_extension_finder_test extends phpbb_test_case
{
@@ -142,6 +143,21 @@ class phpbb_extension_finder_test extends phpbb_test_case
);
}
+ public function test_uncleansub_directory_get_classes()
+ {
+ $classes = $this->finder
+ ->directory('/sub/../sub/type')
+ ->get_classes();
+
+ sort($classes);
+ $this->assertEquals(
+ array(
+ 'phpbb_ext_foo_sub_type_alternative',
+ ),
+ $classes
+ );
+ }
+
/**
* These do not work because of changes with PHPBB3-11386
* They do not seem neccessary to me, so I am commenting them out for now