Fix quotes in exception messages

This commit is contained in:
Fabien Potencier 2020-03-16 10:45:04 +01:00
parent 09ee51aa4d
commit 1ae2da01ff
4 changed files with 4 additions and 4 deletions

View File

@ -405,7 +405,7 @@ class RouterTest extends TestCase
public function testExceptionOnNonStringParameterWithSfContainer()
{
$this->expectException('Symfony\Component\DependencyInjection\Exception\RuntimeException');
$this->expectExceptionMessage('The container parameter "object", used in the route configuration value "/%object%", must be a string or numeric, but it is of type object.');
$this->expectExceptionMessage('The container parameter "object", used in the route configuration value "/%object%", must be a string or numeric, but it is of type "object".');
$routes = new RouteCollection();
$routes->add('foo', new Route('/%object%'));

View File

@ -52,7 +52,7 @@ class AddSecurityVotersPass implements CompilerPassInterface
$class = $container->getParameterBag()->resolveValue($definition->getClass());
if (!is_a($class, VoterInterface::class, true)) {
throw new LogicException(sprintf('%s must implement the %s when used as a voter.', $class, VoterInterface::class));
throw new LogicException(sprintf('"%s" must implement the "%s" when used as a voter.', $class, VoterInterface::class));
}
if ($debug) {

View File

@ -121,7 +121,7 @@ class GuardAuthenticationProviderTest extends TestCase
/**
* @group legacy
* @expectedDeprecation %s::checkCredentials() must return a boolean value. You returned NULL. This behavior is deprecated in Symfony 4.4 and will trigger a TypeError in Symfony 5.
* @expectedDeprecation "%s::checkCredentials()" must return a boolean value. You returned "NULL". This behavior is deprecated in Symfony 4.4 and will trigger a TypeError in Symfony 5.
*/
public function testCheckCredentialsReturningNonTrueFailsAuthentication()
{

View File

@ -55,7 +55,7 @@ trait ConstructorArgumentsTestTrait
$normalizer = $this->getDenormalizerForConstructArguments();
$this->expectException(MissingConstructorArgumentsException::class);
$this->expectExceptionMessage('Cannot create an instance of '.ConstructorArgumentsObject::class.' from serialized data because its constructor requires parameter "bar" to be present.');
$this->expectExceptionMessage('Cannot create an instance of "'.ConstructorArgumentsObject::class.'" from serialized data because its constructor requires parameter "bar" to be present.');
$normalizer->denormalize($data, ConstructorArgumentsObject::class);
}
}