escapeValue() 공개 메소드

{@inheritDoc}
public escapeValue ( $value )
예제 #1
0
 public function testEscapeValue()
 {
     $bag = new ParameterBag();
     $bag->add(array('foo' => $bag->escapeValue(array('bar' => array('ding' => 'I\'m a bar %foo %bar', 'zero' => null))), 'bar' => $bag->escapeValue('I\'m a %foo%')));
     $this->assertEquals('I\'m a %%foo%%', $bag->get('bar'), '->escapeValue() escapes % by doubling it');
     $this->assertEquals(array('bar' => array('ding' => 'I\'m a bar %%foo %%bar', 'zero' => null)), $bag->get('foo'), '->escapeValue() escapes % by doubling it');
 }