aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2013-07-11 15:28:26 -0700
committerNils Adermann <naderman@naderman.de>2013-07-11 15:28:26 -0700
commitb1d3c1bf6990c8105c18eb9db06ebf9c974b0899 (patch)
tree351491d515d8eec616a466109a98afea42821114 /tests
parent382ae5a01ee9c1b694382f2e9a7cc14ffb6974ac (diff)
parent1a5d685f45e5fd4450750227ef2eefe34a9b482a (diff)
downloadforums-b1d3c1bf6990c8105c18eb9db06ebf9c974b0899.tar
forums-b1d3c1bf6990c8105c18eb9db06ebf9c974b0899.tar.gz
forums-b1d3c1bf6990c8105c18eb9db06ebf9c974b0899.tar.bz2
forums-b1d3c1bf6990c8105c18eb9db06ebf9c974b0899.tar.xz
forums-b1d3c1bf6990c8105c18eb9db06ebf9c974b0899.zip
Merge pull request #1522 from igorw/feature/bootstrap-dic
[feature/bootstrap-dic] Bootstrap container from config.php
Diffstat (limited to 'tests')
-rw-r--r--tests/di/create_container_test.php3
-rw-r--r--tests/template/template_test_case.php5
2 files changed, 6 insertions, 2 deletions
diff --git a/tests/di/create_container_test.php b/tests/di/create_container_test.php
index 6de8803df9..b3992dbd80 100644
--- a/tests/di/create_container_test.php
+++ b/tests/di/create_container_test.php
@@ -40,11 +40,12 @@ class phpbb_di_container_test extends phpbb_test_case
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),
);
- $container = phpbb_create_compiled_container($extensions, array(), $phpbb_root_path, 'php');
+ $container = phpbb_create_compiled_container($config_file, $extensions, array(), $phpbb_root_path, 'php');
$this->assertInstanceOf('Symfony\Component\DependencyInjection\ContainerBuilder', $container);
$this->assertTrue($container->isFrozen());
diff --git a/tests/template/template_test_case.php b/tests/template/template_test_case.php
index 3e2cd5a387..4a7bf8d168 100644
--- a/tests/template/template_test_case.php
+++ b/tests/template/template_test_case.php
@@ -84,7 +84,10 @@ class phpbb_template_template_test_case extends phpbb_test_case
protected function tearDown()
{
- $this->template->clear_cache();
+ if ($this->template)
+ {
+ $this->template->clear_cache();
+ }
}
protected function run_template($file, array $vars, array $block_vars, array $destroy, $expected, $lang_vars = array())