mirror of
https://github.com/phpbb/phpbb.git
synced 2025-04-13 20:32:11 +02:00
[ticket/12620] Fix tests
PHPBB3-12620
This commit is contained in:
parent
3a167aa0c3
commit
0b61e3540d
@ -195,6 +195,8 @@ class container_builder
|
||||
$loader = new YamlFileLoader($this->container, new FileLocator(phpbb_realpath($this->get_config_path())));
|
||||
$loader->load(PHPBB_ENVIRONMENT . '/config.yml');
|
||||
|
||||
$this->inject_custom_parameters();
|
||||
|
||||
if ($this->compile_container)
|
||||
{
|
||||
$this->container->compile();
|
||||
@ -430,6 +432,20 @@ class container_builder
|
||||
return $container;
|
||||
}
|
||||
|
||||
/**
|
||||
* Inject the customs parameters into the container
|
||||
*/
|
||||
protected function inject_custom_parameters()
|
||||
{
|
||||
if ($this->custom_parameters !== null)
|
||||
{
|
||||
foreach ($this->custom_parameters as $key => $value)
|
||||
{
|
||||
$this->container->setParameter($key, $value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the core parameters.
|
||||
*
|
||||
|
@ -146,7 +146,6 @@ namespace
|
||||
$this->assertInstanceOf('Symfony\Component\DependencyInjection\ContainerBuilder', $container);
|
||||
|
||||
$this->assertTrue($container->hasParameter('my_parameter'));
|
||||
$this->assertFalse($container->hasParameter('core.root_path'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
2
tests/di/fixtures/other_config/development/config.yml
Normal file
2
tests/di/fixtures/other_config/development/config.yml
Normal file
@ -0,0 +1,2 @@
|
||||
core:
|
||||
require_dev_dependencies: true
|
Loading…
x
Reference in New Issue
Block a user