diff --git a/src/Symfony/Component/DependencyInjection/Tests/ParameterBag/EnvPlaceholderParameterBagTest.php b/src/Symfony/Component/DependencyInjection/Tests/ParameterBag/EnvPlaceholderParameterBagTest.php index 268c28283006..89030ec918ab 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/ParameterBag/EnvPlaceholderParameterBagTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/ParameterBag/EnvPlaceholderParameterBagTest.php @@ -31,7 +31,7 @@ public function testGetThrowsInvalidArgumentExceptionIfEnvNameContainsNonWordCha { $bag = new EnvPlaceholderParameterBag(); $this->expectException(InvalidArgumentException::class); - $this->expectExceptionMessage('Invalid env(%foo%) name: only "word" characters are allowed.'); + $this->expectExceptionMessage('The given env var name "env(%foo%)" contains invalid characters (allowed characters: letters, digits, hyphens, backslashes and colons).'); $bag->get('env(%foo%)'); }