public function ParameterBagTest::testResolveUnescapesValue in Service Container 7.2
Same name and namespace in other branches
- 7 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/ParameterBag/ParameterBagTest.php \Symfony\Component\DependencyInjection\Tests\ParameterBag\ParameterBagTest::testResolveUnescapesValue()
@covers Symfony\Component\DependencyInjection\ParameterBag\ParameterBag::resolve
File
- modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ Tests/ ParameterBag/ ParameterBagTest.php, line 226
Class
Namespace
Symfony\Component\DependencyInjection\Tests\ParameterBagCode
public function testResolveUnescapesValue() {
$bag = new ParameterBag(array(
'foo' => array(
'bar' => array(
'ding' => 'I\'m a bar %%foo %%bar',
),
),
'bar' => 'I\'m a %%foo%%',
));
$bag
->resolve();
$this
->assertEquals('I\'m a %foo%', $bag
->get('bar'), '->resolveValue() supports % escaping by doubling it');
$this
->assertEquals(array(
'bar' => array(
'ding' => 'I\'m a bar %foo %bar',
),
), $bag
->get('foo'), '->resolveValue() supports % escaping by doubling it');
}