From f6632fcfd08650f13560529a6a04c152aefd4e3c Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Mon, 22 Aug 2011 02:17:00 -0400 Subject: [feature/extension-manager] Add filename prefix matching in extension finder PHPBB3-10323 --- tests/extension/finder_test.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'tests/extension/finder_test.php') diff --git a/tests/extension/finder_test.php b/tests/extension/finder_test.php index b0c98da554..4acfe53937 100644 --- a/tests/extension/finder_test.php +++ b/tests/extension/finder_test.php @@ -55,6 +55,24 @@ class phpbb_extension_finder_test extends phpbb_test_case ); } + public function test_prefix_get_classes() + { + $classes = $this->finder + ->default_path('includes/default/') + ->prefix('hidden_') + ->default_prefix('') + ->get_classes(); + + sort($classes); + $this->assertEquals( + array( + 'phpbb_default_implementation', + 'phpbb_ext_bar_my_hidden_class', + ), + $classes + ); + } + public function test_directory_get_classes() { $classes = $this->finder @@ -109,8 +127,10 @@ class phpbb_extension_finder_test extends phpbb_test_case $query = array( 'default_path' => 'includes/foo', 'default_suffix' => false, + 'default_prefix' => false, 'default_directory' => 'bar', 'suffix' => false, + 'prefix' => false, 'directory' => false, ); -- cgit v1.2.1