aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Guse <nathaniel.guse@gmail.com>2013-05-14 18:56:16 -0500
committerNathan Guse <nathaniel.guse@gmail.com>2013-05-14 18:56:16 -0500
commit20815ed5a2032dbad628304d31a0c29b6eef3d4f (patch)
tree970c740e4897aebe114817ed1ecf94080618bf08
parentf91f8666fd423c3e9f74d05355c8fa3e8ece2de9 (diff)
downloadforums-20815ed5a2032dbad628304d31a0c29b6eef3d4f.tar
forums-20815ed5a2032dbad628304d31a0c29b6eef3d4f.tar.gz
forums-20815ed5a2032dbad628304d31a0c29b6eef3d4f.tar.bz2
forums-20815ed5a2032dbad628304d31a0c29b6eef3d4f.tar.xz
forums-20815ed5a2032dbad628304d31a0c29b6eef3d4f.zip
[ticket/11415] Add test for find_from_extension()
PHPBB3-11415
-rw-r--r--tests/extension/finder_test.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/extension/finder_test.php b/tests/extension/finder_test.php
index dc3e26be02..6f3cebbd7c 100644
--- a/tests/extension/finder_test.php
+++ b/tests/extension/finder_test.php
@@ -158,6 +158,23 @@ class phpbb_extension_finder_test extends phpbb_test_case
);
}
+ public function test_find_from_extension()
+ {
+ $files = $this->finder
+ ->extension_directory('/type')
+ ->find_from_extension('foo', dirname(__FILE__) . '/ext/foo/');
+ $classes = $this->finder->get_classes_from_files($files);
+
+ sort($classes);
+ $this->assertEquals(
+ array(
+ 'phpbb_ext_foo_type_alternative',
+ 'phpbb_ext_foo_type_dummy_empty',
+ ),
+ $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