Skip to content

Commit 43e4790

Browse files
committed
Fix quotes in exception messages
1 parent 3115bfc commit 43e4790

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Constraints/Compound.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ abstract class Compound extends Composite
2727
public function __construct($options = null)
2828
{
2929
if (isset($options[$this->getCompositeOption()])) {
30-
throw new ConstraintDefinitionException(sprintf('You can\'t redefine the "%s" option. Use the %s::getConstraints() method instead.', $this->getCompositeOption(), __CLASS__));
30+
throw new ConstraintDefinitionException(sprintf('You can\'t redefine the "%s" option. Use the "%s::getConstraints()" method instead.', $this->getCompositeOption(), __CLASS__));
3131
}
3232

3333
$this->constraints = $this->getConstraints($this->normalizeOptions($options));

Tests/Constraints/CompoundTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class CompoundTest extends TestCase
2222
public function testItCannotRedefineConstraintsOption()
2323
{
2424
$this->expectException(ConstraintDefinitionException::class);
25-
$this->expectExceptionMessage('You can\'t redefine the "constraints" option. Use the Symfony\Component\Validator\Constraints\Compound::getConstraints() method instead.');
25+
$this->expectExceptionMessage('You can\'t redefine the "constraints" option. Use the "Symfony\Component\Validator\Constraints\Compound::getConstraints()" method instead.');
2626
new EmptyCompound(['constraints' => [new NotBlank()]]);
2727
}
2828

Tests/Constraints/SequentiallyTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class SequentiallyTest extends TestCase
2121
public function testRejectNonConstraints()
2222
{
2323
$this->expectException(ConstraintDefinitionException::class);
24-
$this->expectExceptionMessage('The value foo is not an instance of Constraint in constraint Symfony\Component\Validator\Constraints\Sequentially');
24+
$this->expectExceptionMessage('The value "foo" is not an instance of Constraint in constraint "Symfony\Component\Validator\Constraints\Sequentially"');
2525
new Sequentially([
2626
'foo',
2727
]);
@@ -30,7 +30,7 @@ public function testRejectNonConstraints()
3030
public function testRejectValidConstraint()
3131
{
3232
$this->expectException(ConstraintDefinitionException::class);
33-
$this->expectExceptionMessage('The constraint Valid cannot be nested inside constraint Symfony\Component\Validator\Constraints\Sequentially');
33+
$this->expectExceptionMessage('The constraint Valid cannot be nested inside constraint "Symfony\Component\Validator\Constraints\Sequentially"');
3434
new Sequentially([
3535
new Valid(),
3636
]);

0 commit comments

Comments
 (0)