public function ParameterBagTest::testResolveIndicatesWhyAParameterIsNeeded in Service Container 7
Same name and namespace in other branches
- 7.2 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/ParameterBag/ParameterBagTest.php \Symfony\Component\DependencyInjection\Tests\ParameterBag\ParameterBagTest::testResolveIndicatesWhyAParameterIsNeeded()
@covers Symfony\Component\DependencyInjection\ParameterBag\ParameterBag::resolve
File
- modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ Tests/ ParameterBag/ ParameterBagTest.php, line 204
Class
Namespace
Symfony\Component\DependencyInjection\Tests\ParameterBagCode
public function testResolveIndicatesWhyAParameterIsNeeded() {
$bag = new ParameterBag(array(
'foo' => '%bar%',
));
try {
$bag
->resolve();
} catch (ParameterNotFoundException $e) {
$this
->assertEquals('The parameter "foo" has a dependency on a non-existent parameter "bar".', $e
->getMessage());
}
$bag = new ParameterBag(array(
'foo' => '%bar%',
));
try {
$bag
->resolve();
} catch (ParameterNotFoundException $e) {
$this
->assertEquals('The parameter "foo" has a dependency on a non-existent parameter "bar".', $e
->getMessage());
}
}