Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d17b333

Browse filesBrowse files
committed
minor #32404 [Validator] remove tests for legacy behaviour (xabbuh)
This PR was merged into the 5.0-dev branch. Discussion ---------- [Validator] remove tests for legacy behaviour | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | Commits ------- d6d4aba remove tests for legacy behaviour
2 parents 123d5b2 + d6d4aba commit d17b333
Copy full SHA for d17b333

File tree

Expand file treeCollapse file tree

3 files changed

+1
-48
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+1
-48
lines changed

‎src/Symfony/Component/Validator/ConstraintViolation.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/ConstraintViolation.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public function __toString()
8484
$class .= '.';
8585
}
8686

87-
if ('' !== $code = (string) $this->code) {
87+
if (null !== $this->code && '' !== $code = $this->code) {
8888
$code = ' (code '.$code.')';
8989
}
9090

‎src/Symfony/Component/Validator/Tests/ConstraintViolationTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/Tests/ConstraintViolationTest.php
-16Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -108,20 +108,4 @@ public function testToStringOmitsEmptyCodes()
108108

109109
$this->assertSame($expected, (string) $violation);
110110
}
111-
112-
public function testNonStringCode()
113-
{
114-
$violation = new ConstraintViolation(
115-
'42 cannot be used here',
116-
'this is the message template',
117-
[],
118-
['some_value' => 42],
119-
'some_value',
120-
null,
121-
null,
122-
42
123-
);
124-
125-
self::assertSame('42', $violation->getCode());
126-
}
127111
}

‎src/Symfony/Component/Validator/Tests/Violation/ConstraintViolationBuilderTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/Tests/Violation/ConstraintViolationBuilderTest.php
-31Lines changed: 0 additions & 31 deletions
This file was deleted.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.