Skip to content

Commit c699b9c

Browse files
Merge branch '5.0'
* 5.0: [Validator] fix merge
2 parents be8adfa + 270d204 commit c699b9c

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/Symfony/Component/Validator/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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy