8000 [Validator] Fix tests by making constraint options dumps order consis… · symfony/symfony@181d548 · GitHub
[go: up one dir, main page]

Skip to content

Commit 181d548

Browse files
[Validator] Fix tests by making constraint options dumps order consistent
1 parent 6ff8926 commit 181d548

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/Symfony/Component/Validator/Command/DebugCommand.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,8 @@ private function getConstraintOptions(Constraint $constraint): array
165165
$options[$propertyName] = $constraint->$propertyName;
166166
}
167167

168+
ksort($options);
169+
168170
return $options;
169171
}
170172

src/Symfony/Component/Validator/Tests/Command/DebugCommandTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ public function testOutputWithClassArgument()
7272
| Property | Name | Groups | Options |
7373
+---------------+--------------------------------------------------+---------+------------------------------------------------------------+
7474
| firstArgument | Symfony\Component\Validator\Constraints\NotBlank | Default | [ |
75-
| | | | "message" => "This value should not be blank.", |
7675
| | | | "allowNull" => false, |
76+
| | | | "message" => "This value should not be blank.", |
7777
| | | | "normalizer" => null, |
7878
| | | | "payload" => null |
7979
| | | | ] |
@@ -133,8 +133,8 @@ public function testOutputWithPathArgument()
133133
| Property | Name | Groups | Options |
134134
+---------------+--------------------------------------------------+---------+------------------------------------------------------------+
135135
| firstArgument | Symfony\Component\Validator\Constraints\NotBlank | Default | [ |
136-
| | | | "message" => "This value should not be blank.", |
137136
| | | | "allowNull" => false, |
137+
| | | | "message" => "This value should not be blank.", |
138138
| | | | "normalizer" => null, |
139139
| | | | "payload" => null |
140140
| | | | ] |
@@ -153,8 +153,8 @@ public function testOutputWithPathArgument()
153153
| Property | Name | Groups | Options |
154154
+---------------+--------------------------------------------------+---------+------------------------------------------------------------+
155155
| firstArgument | Symfony\Component\Validator\Constraints\NotBlank | Default | [ |
156-
| | | | "message" => "This value should not be blank.", |
157156
| | | | "allowNull" => false, |
157+
| | | | "message" => "This value should not be blank.", |
158158
| | | | "normalizer" => null, |
159159
| | | | "payload" => null |
160160
| | | | ] |

0 commit comments

Comments
 (0)
0