resolveString() public method

Resolves parameters inside a string
public resolveString ( string $value, array $resolving = [] ) : string
$value string The string to resolve
$resolving array An array of keys that are being resolved (used internally to detect circular references)
return string The resolved string
Esempio n. 1
0
 /**
  * @covers Symfony\Component\DependencyInjection\ParameterBag\ParameterBag::resolve
  * @dataProvider stringsWithSpacesProvider
  */
 public function testResolveStringWithSpacesReturnsString($expected, $test, $description)
 {
     $bag = new ParameterBag(array('foo' => 'bar'));
     try {
         $this->assertEquals($expected, $bag->resolveString($test), $description);
     } catch (ParameterNotFoundException $e) {
         $this->fail(sprintf('%s - "%s"', $description, $expected));
     }
 }