8000 Added a failing testcase for escaped % in array parameters · Olajide/symfony@a1b6d4c · GitHub
[go: up one dir, main page]

Skip to content

Commit a1b6d4c

Browse files
lsmith77stof
authored andcommitted
Added a failing testcase for escaped % in array parameters
1 parent 9fa3201 commit a1b6d4c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tests/Symfony/Tests/Component/DependencyInjection/ParameterBag/ParameterBagTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ public function testResolveValue()
9494
$this->assertEquals(array('bar' => array('bar' => array('bar' => 'bar'))), $bag->resolveValue(array('%foo%' => array('%foo%' => array('%foo%' => '%foo%')))), '->resolveValue() replaces placeholders in nested arrays');
9595
$this->assertEquals('I\'m a %%foo%%', $bag->resolveValue('I\'m a %%foo%%'), '->resolveValue() supports % escaping by doubling it');
9696
$this->assertEquals('I\'m a bar %%foo bar', $bag->resolveValue('I\'m a %foo% %%foo %foo%'), '->resolveValue() supports % escaping by doubling it');
97+
$this->assertEquals(array('foo' => array('bar' => array('ding' => 'I\'m a bar %foo %bar'))), $bag->resolveValue(array('foo' => array('bar' => array('ding' => 'I\'m a bar %%foo %%bar')))), '->resolveValue() supports % escaping by doubling it');
9798

9899
$bag = new ParameterBag(array('foo' => true));
99100
$this->assertSame(true, $bag->resolveValue('%foo%'), '->resolveValue() replaces arguments that are just a placeholder by their value without casting them to strings');

0 commit comments

Comments
 (0)
0