$this->assertInstanceOf('Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException',$e,'->get() throws an Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException if the key does not exist');
$this->assertEquals('You have requested a non-existent parameter "baba".',$e->getMessage(),'->get() throws an Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException if the key does not exist');
$this->fail('->get() throws an Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException if the key does not exist');
}catch(\Exception$e){
$this->assertInstanceOf('Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException',$e,'->get() throws an Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException if the key does not exist');
$this->assertEquals('You have requested a non-existent parameter "foo1". Did you mean this: "foo"?',$e->getMessage(),'->get() throws an Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException with some advices');
$this->fail('->get() throws an Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException if the key does not exist');
}catch(\Exception$e){
$this->assertInstanceOf('Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException',$e,'->get() throws an Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException if the key does not exist');
$this->assertEquals('You have requested a non-existent parameter "bag". Did you mean one of these: "bar", "baz"?',$e->getMessage(),'->get() throws an Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException with some advices');
$this->fail('->get() throws an Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException if the key does not exist');
}catch(\Exception$e){
$this->assertInstanceOf('Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException',$e,'->get() throws an Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException if the key does not exist');
$this->assertEquals('You have requested a non-existent parameter "".',$e->getMessage(),'->get() throws an Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException with some advices');
$this->assertEquals('foo',$bag->resolveValue('foo'),'->resolveValue() returns its argument unmodified if no placeholders are found');
$bag=newParameterBag(array('foo'=>'bar'));
$this->assertEquals('I\'m a bar',$bag->resolveValue('I\'m a %foo%'),'->resolveValue() replaces placeholders by their values');
$this->assertEquals(array('bar'=>'bar'),$bag->resolveValue(array('%foo%'=>'%foo%')),'->resolveValue() replaces placeholders in keys and values of arrays');
$this->assertEquals(array('bar'=>array('bar'=>array('bar'=>'bar'))),$bag->resolveValue(array('%foo%'=>array('%foo%'=>array('%foo%'=>'%foo%')))),'->resolveValue() replaces placeholders in nested arrays');
$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');
$this->assertTrue($bag->resolveValue('%foo%'),'->resolveValue() replaces arguments that are just a placeholder by their value without casting them to strings');
$this->assertNull($bag->resolveValue('%foo%'),'->resolveValue() replaces arguments that are just a placeholder by their value without casting them to strings');
$this->assertEquals('You have requested a non-existent parameter "foobar".',$e->getMessage(),'->resolveValue() throws a ParameterNotFoundException if a placeholder references a non-existent parameter');
$this->fail('->resolveValue() throws a ParameterNotFoundException if a placeholder references a non-existent parameter');
}catch(ParameterNotFoundException$e){
$this->assertEquals('You have requested a non-existent parameter "foobar".',$e->getMessage(),'->resolveValue() throws a ParameterNotFoundException if a placeholder references a non-existent parameter');
$this->assertEquals('A string value must be composed of strings and/or numbers, but found parameter "bar" of type array inside string value "a %bar%".',$e->getMessage(),'->resolveValue() throws a RuntimeException when a parameter embeds another non-string parameter');
$this->fail('->resolveValue() throws a ParameterCircularReferenceException when a parameter has a circular reference');
}catch(ParameterCircularReferenceException$e){
$this->assertEquals('Circular reference detected for parameter "foo" ("foo" > "bar" > "foobar" > "foo").',$e->getMessage(),'->resolveValue() throws a ParameterCircularReferenceException when a parameter has a circular reference');
$this->fail('->resolveValue() throws a ParameterCircularReferenceException when a parameter has a circular reference');
}catch(ParameterCircularReferenceException$e){
$this->assertEquals('Circular reference detected for parameter "foo" ("foo" > "bar" > "foobar" > "foo").',$e->getMessage(),'->resolveValue() throws a ParameterCircularReferenceException when a parameter has a circular reference');