aboutsummaryrefslogtreecommitdiffstats
path: root/tests/class_loader/class_loader_test.php
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2011-06-09 05:13:26 +0200
committerNils Adermann <naderman@naderman.de>2011-09-29 15:42:33 +0200
commit14f1e581faa3b66e7689c55c1e9c0485c0872b1e (patch)
tree437880dd3c80e47a6205beadb005c7ce27a1a960 /tests/class_loader/class_loader_test.php
parent8377418466f861f6b3291ae92a71821f0a0be2d6 (diff)
downloadforums-14f1e581faa3b66e7689c55c1e9c0485c0872b1e.tar
forums-14f1e581faa3b66e7689c55c1e9c0485c0872b1e.tar.gz
forums-14f1e581faa3b66e7689c55c1e9c0485c0872b1e.tar.bz2
forums-14f1e581faa3b66e7689c55c1e9c0485c0872b1e.tar.xz
forums-14f1e581faa3b66e7689c55c1e9c0485c0872b1e.zip
[feature/extension-manager] Extension Manager & Finder
Extensions RFC: http://area51.phpbb.com/phpBB/viewtopic.php?f=84&t=41499 Ticket: http://tracker.phpbb.com/browse/PHPBB3-10323 PHPBB3-10323
Diffstat (limited to 'tests/class_loader/class_loader_test.php')
-rw-r--r--tests/class_loader/class_loader_test.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/class_loader/class_loader_test.php b/tests/class_loader/class_loader_test.php
index 0c7fe3f97a..7d5f57aac3 100644
--- a/tests/class_loader/class_loader_test.php
+++ b/tests/class_loader/class_loader_test.php
@@ -26,7 +26,7 @@ class phpbb_class_loader_test extends PHPUnit_Framework_TestCase
public function test_resolve_path()
{
$prefix = dirname(__FILE__) . '/';
- $class_loader = new phpbb_class_loader($prefix);
+ $class_loader = new phpbb_class_loader($prefix . 'includes/', $prefix . 'ext/');
$prefix .= 'includes/';
@@ -56,6 +56,11 @@ class phpbb_class_loader_test extends PHPUnit_Framework_TestCase
$class_loader->resolve_path('phpbb_dir2'),
'Class with name of dir within dir (short class name)'
);
+ $this->assertEquals(
+ dirname(__FILE__) . '/ext/foo/class.php',
+ $class_loader->resolve_path('phpbb_ext_foo_class'),
+ 'Extension class'
+ );
}
public function test_resolve_cached()
@@ -64,7 +69,7 @@ class phpbb_class_loader_test extends PHPUnit_Framework_TestCase
$cache = new phpbb_mock_cache($cacheMap);
$prefix = dirname(__FILE__) . '/';
- $class_loader = new phpbb_class_loader($prefix, '.php', $cache);
+ $class_loader = new phpbb_class_loader($prefix . 'includes/', $prefix . 'ext/', '.php', $cache);
$prefix .= 'includes/';