Skip to content

Commit 901fe0d

Browse files
committed
pass error code as a string
1 parent bcc66e3 commit 901fe0d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Component/Validator/Tests/Validator/AbstractTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ public function testAddCustomizedViolation()
511511
->setParameter('%param%', 'value')
512512
->setInvalidValue('Invalid value')
513513
->setPlural(2)
514-
->setCode(42)
514+
->setCode('42')
515515
->addViolation();
516516
};
517517

@@ -528,7 +528,7 @@ public function testAddCustomizedViolation()
528528
$this->assertSame($entity, $violations[0]->getRoot());
529529
$this->assertSame('Invalid value', $violations[0]->getInvalidValue());
530530
$this->assertSame(2, $violations[0]->getPlural());
531-
$this->assertSame(42, $violations[0]->getCode());
531+
$this->assertSame('42', $violations[0]->getCode());
532532
}
533533

534534
public function testNoDuplicateValidationIfClassConstraintInMultipleGroups()

0 commit comments

Comments
 (0)