mirror of
https://github.com/phpbb/phpbb.git
synced 2025-02-24 20:13:22 +01:00
* upstream/develop: (575 commits) [ticket/11702] Fix forum_posts left over for link-click counts in viewforum.php [ticket/11696] Move file to new directory [ticket/11696] Rename constructor to __construct() [ticket/11696] Remove manual loading of db_tools in extension controller test [ticket/11696] Rename db_tools.php so it can be autoloaded [ticket/11698] Moving all autoloadable files to phpbb/ [ticket/11694] Do not locate assets with root path [ticket/11692] Don't update search_type in dev migration if already appended [ticket/11675] Fix template loop [ticket/11690] Old module class names may get autoloaded by class_exists [ticket/9649] Display information on index for moderators on unapproved posts [ticket/10999] Fix assets_version in ACP [prep-release-3.0.12] More changelog items for the 3.0.12 release. [ticket/11687] Add assets_version to phpbb_config [ticket/11686] Not checking for phpBB Debug errors on functional tests [ticket/11670] Consistency with logo: Replace "phpBB(tm)" with "phpBB(R)". [ticket/11674] Do not include vendor folder if there are no dependencies. [ticket/11685] Remove logout confirmation page [ticket/11684] Remove useless confirmation page after login and admin login [ticket/9657] Define user before injecting ... Conflicts: phpBB/includes/functions_container.php phpBB/install/database_update.php phpBB/install/index.php
73 lines
2.2 KiB
PHP
73 lines
2.2 KiB
PHP
<?php
|
|
/**
|
|
*
|
|
* @package testing
|
|
* @copyright (c) 2012 phpBB Group
|
|
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
|
*
|
|
*/
|
|
|
|
require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
|
|
require_once dirname(__FILE__) . '/../../phpBB/includes/functions_container.php';
|
|
|
|
class phpbb_di_container_test extends phpbb_test_case
|
|
{
|
|
public function test_phpbb_create_container()
|
|
{
|
|
$phpbb_root_path = __DIR__ . '/../../phpBB/';
|
|
$extensions = array(
|
|
new phpbb_di_extension_config(__DIR__ . '/fixtures/config.php'),
|
|
new phpbb_di_extension_core($phpbb_root_path . 'config'),
|
|
);
|
|
$container = phpbb_create_container($extensions, $phpbb_root_path, 'php');
|
|
|
|
$this->assertInstanceOf('Symfony\Component\DependencyInjection\ContainerBuilder', $container);
|
|
}
|
|
|
|
public function test_phpbb_create_install_container()
|
|
{
|
|
$phpbb_root_path = __DIR__ . '/../../phpBB/';
|
|
$extensions = array(
|
|
new phpbb_di_extension_config(__DIR__ . '/fixtures/config.php'),
|
|
new phpbb_di_extension_core($phpbb_root_path . 'config'),
|
|
);
|
|
$container = phpbb_create_install_container($phpbb_root_path, 'php');
|
|
|
|
$this->assertInstanceOf('Symfony\Component\DependencyInjection\ContainerBuilder', $container);
|
|
$this->assertTrue($container->isFrozen());
|
|
}
|
|
|
|
public function test_phpbb_create_compiled_container()
|
|
{
|
|
$phpbb_root_path = __DIR__ . '/../../phpBB/';
|
|
$config_file = __DIR__ . '/fixtures/config.php';
|
|
$extensions = array(
|
|
new phpbb_di_extension_config(__DIR__ . '/fixtures/config.php'),
|
|
new phpbb_di_extension_core($phpbb_root_path . 'config'),
|
|
);
|
|
$container = phpbb_create_compiled_container($config_file, $extensions, array(), $phpbb_root_path, 'php');
|
|
|
|
$this->assertInstanceOf('Symfony\Component\DependencyInjection\ContainerBuilder', $container);
|
|
$this->assertTrue($container->isFrozen());
|
|
}
|
|
}
|
|
|
|
class phpbb_db_driver_container_mock extends phpbb_db_driver
|
|
{
|
|
public function sql_connect()
|
|
{
|
|
}
|
|
|
|
public function sql_query()
|
|
{
|
|
}
|
|
|
|
public function sql_fetchrow()
|
|
{
|
|
}
|
|
|
|
public function sql_freeresult()
|
|
{
|
|
}
|
|
}
|