mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-03 14:17:56 +02:00
Made is_available much more strict, in line with the checks in all_available Refactor all_available to use is_available, saving duplicate code. Further simplify is_available by using metadata_manager. Make optional the template object on metadata_manager creation. Fix extension_manager_mock to have config and user components. PHPBB3-14938
27 lines
737 B
PHP
27 lines
737 B
PHP
<?php
|
|
/**
|
|
*
|
|
* This file is part of the phpBB Forum Software package.
|
|
*
|
|
* @copyright (c) phpBB Limited <https://www.phpbb.com>
|
|
* @license GNU General Public License, version 2 (GPL-2.0)
|
|
*
|
|
* For full copyright and license information, please see
|
|
* the docs/CREDITS.txt file.
|
|
*
|
|
*/
|
|
|
|
class phpbb_mock_extension_manager extends \phpbb\extension\manager
|
|
{
|
|
public function __construct($phpbb_root_path, $extensions = array(), $container = null)
|
|
{
|
|
$this->phpbb_root_path = $phpbb_root_path;
|
|
$this->php_ext = 'php';
|
|
$this->extensions = $extensions;
|
|
$this->filesystem = new \phpbb\filesystem();
|
|
$this->container = $container;
|
|
$this->config = new \phpbb\config\config(array());
|
|
$this->user = new \phpbb\user('\phpbb\datetime');
|
|
}
|
|
}
|