1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +02:00

[ticket/11700] Correctly load extensions with nonprefixed namespaces

PHPBB3-11700
This commit is contained in:
Nils Adermann
2013-09-17 16:15:44 +02:00
parent d12f358855
commit c4b53490ad
29 changed files with 111 additions and 72 deletions

View File

@@ -60,13 +60,13 @@ class phpbb_class_loader_test extends PHPUnit_Framework_TestCase
{
$cache_map = array(
'class_loader_phpbb__' => array('phpbb\\a\\cached_name' => 'a/cached_name'),
'class_loader_phpbb__ext__' => array('phpbb\\ext\\foo' => 'foo'),
'class_loader___' => array('phpbb\\ext\\foo' => 'foo'),
);
$cache = new phpbb_mock_cache($cache_map);
$prefix = dirname(__FILE__) . '/';
$class_loader = new \phpbb\class_loader('phpbb\\', $prefix . 'phpbb/', 'php', $cache);
$class_loader_ext = new \phpbb\class_loader('phpbb\\ext\\', $prefix . 'phpbb/', 'php', $cache);
$class_loader_ext = new \phpbb\class_loader('\\', $prefix . 'phpbb/', 'php', $cache);
$prefix .= 'phpbb/';