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:
@@ -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()));
|
||||
|
Reference in New Issue
Block a user