aboutsummaryrefslogtreecommitdiffstats
path: root/tests/di/create_container_test.php
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2013-09-27 10:47:10 +0200
committerMarc Alexander <admin@m-a-styles.de>2013-09-27 10:47:10 +0200
commit663b4b2eb74e8edb076c962662ff5124e94353ea (patch)
tree0ff449c776397b2b66fc7d567f93bbb7d62ea2e3 /tests/di/create_container_test.php
parent01512104b5823d15eed64d362b41b9594f870f0c (diff)
parent8db820be634cfce0fdb079fdbaee2c49661a7870 (diff)
downloadforums-663b4b2eb74e8edb076c962662ff5124e94353ea.tar
forums-663b4b2eb74e8edb076c962662ff5124e94353ea.tar.gz
forums-663b4b2eb74e8edb076c962662ff5124e94353ea.tar.bz2
forums-663b4b2eb74e8edb076c962662ff5124e94353ea.tar.xz
forums-663b4b2eb74e8edb076c962662ff5124e94353ea.zip
Merge branch 'develop' of https://github.com/phpbb/phpbb3 into feature/passwords
Conflicts: phpBB/develop/create_schema_files.php
Diffstat (limited to 'tests/di/create_container_test.php')
-rw-r--r--tests/di/create_container_test.php106
1 files changed, 56 insertions, 50 deletions
diff --git a/tests/di/create_container_test.php b/tests/di/create_container_test.php
index c570f19ebd..a3a1ad3597 100644
--- a/tests/di/create_container_test.php
+++ b/tests/di/create_container_test.php
@@ -7,66 +7,72 @@
*
*/
-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
+namespace
{
- 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');
+ 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);
- }
+ $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');
+ 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());
- }
+ $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');
+ 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());
- }
+ $this->assertInstanceOf('Symfony\Component\DependencyInjection\ContainerBuilder', $container);
+ $this->assertTrue($container->isFrozen());
+ }
+ }
}
-class phpbb_db_driver_container_mock extends phpbb_db_driver
+namespace phpbb\db\driver
{
- public function sql_connect()
- {
- }
+ class container_mock extends \phpbb\db\driver\driver
+ {
+ public function sql_connect()
+ {
+ }
- public function sql_query()
- {
- }
+ public function sql_query()
+ {
+ }
- public function sql_fetchrow()
- {
- }
+ public function sql_fetchrow()
+ {
+ }
- public function sql_freeresult()
- {
- }
+ public function sql_freeresult()
+ {
+ }
+ }
}