1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-10 10:44:20 +02:00

[feature/extension-manager] The class loader no longer knows about extensions

Instead the class loader is instantiated twice. Once with the phpbb_ prefix
and once with the phpbb_ext_ prefix.

PHPBB3-10323
This commit is contained in:
Nils Adermann
2011-08-15 21:38:47 -04:00
parent 989bd9cde7
commit 96209e0224
9 changed files with 77 additions and 81 deletions

View File

@@ -23,30 +23,15 @@ class phpbb_extension_manager_test extends phpbb_database_test_case
{
parent::setUp();
// disable the regular class loader to replace it with one that loads
// test extensions
global $class_loader;
$class_loader->unregister();
$prefix = dirname(__FILE__) . '/';
$this->class_loader = new phpbb_class_loader($prefix . '../../phpBB/includes/', $prefix . 'ext/');
$this->class_loader->register();
$this->extension_manager = new phpbb_extension_manager(
$this->new_dbal(),
'phpbb_ext',
$prefix,
dirname(__FILE__) . '/',
'.php',
new phpbb_mock_cache
);
}
protected function tearDown()
{
global $class_loader;
$class_loader->register();
}
public function test_available()
{
$this->assertEquals(array('bar', 'foo', 'moo'), array_keys($this->extension_manager->all_available()));