Skip to content

Commit 909c458

Browse files
Merge branch '4.4' into 5.0
* 4.4: [Validator] fix merge
2 parents fe94566 + 1780dff commit 909c458

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

Tests/Violation/ConstraintViolationBuilderTest.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,16 @@
1616
use Symfony\Component\Validator\Constraints\Valid;
1717
use Symfony\Component\Validator\ConstraintViolation;
1818
use Symfony\Component\Validator\ConstraintViolationList;
19-
use Symfony\Component\Validator\Test\ForwardCompatTestTrait;
2019
use Symfony\Component\Validator\Violation\ConstraintViolationBuilder;
2120

2221
class ConstraintViolationBuilderTest extends TestCase
2322
{
24-
use ForwardCompatTestTrait;
25-
2623
private $root;
2724
private $violations;
2825
private $messageTemplate = '%value% is invalid';
2926
private $builder;
3027

31-
private function doSetUp()
28+
protected function setUp(): void
3229
{
3330
$this->root = [
3431
'data' => [
@@ -69,10 +66,10 @@ public function testAppendMultiplePropertyPaths()
6966
public function testCodeCanBeSet()
7067
{
7168
$this->builder
72-
->setCode(5)
69+
->setCode('5')
7370
->addViolation();
7471

75-
$this->assertViolationEquals(new ConstraintViolation($this->messageTemplate, $this->messageTemplate, [], $this->root, 'data', 'foo', null, 5, new Valid()));
72+
$this->assertViolationEquals(new ConstraintViolation($this->messageTemplate, $this->messageTemplate, [], $this->root, 'data', 'foo', null, '5', new Valid()));
7673
}
7774

7875
public function testCauseCanBeSet()

0 commit comments

Comments
 (0)