Skip to content

Commit

Permalink
change order for more reliable test
Browse files Browse the repository at this point in the history
  • Loading branch information
SjorsO committed Jan 2, 2020
1 parent 2b1cb5f commit 0ae3871
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/Validation/ValidationValidatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4953,21 +4953,21 @@ public function providesPassingExcludeIfData()
'vehicles' => [
['type' => 'car', 'wheels' => [
['color' => 'red', 'shape' => 'square'],
['color' => 'red', 'shape' => 'round', 'junk' => 'no rule, still present'],
['color' => 'blue', 'shape' => 'hexagon'],
['color' => 'red', 'shape' => 'round', 'junk' => 'no rule, still present'],
['color' => 'blue', 'shape' => 'triangle'],
]],
['type' => 'boat'],
],
], [
'vehicles' => [
['type' => 'car', 'wheels' => [
['color' => 'red', 'shape' => 'square'],
['color' => 'red', 'shape' => 'round', 'junk' => 'no rule, still present'],
// The shape field for these blue wheels were correctly excluded (if they weren't, they would
// fail the validation). They still appear in the validated data. This behaviour is unrelated
// to the "exclude" type rules.
['color' => 'red', 'shape' => 'square'],
['color' => 'blue', 'shape' => 'hexagon'],
['color' => 'red', 'shape' => 'round', 'junk' => 'no rule, still present'],
['color' => 'blue', 'shape' => 'triangle'],
]],
['type' => 'boat'],
Expand Down Expand Up @@ -5076,15 +5076,15 @@ public function providesFailingExcludeIfData()
'vehicles' => [
['type' => 'car', 'wheels' => [
['color' => 'red', 'shape' => 'square'],
['color' => 'red', 'shape' => 'hexagon'],
['color' => 'blue', 'shape' => 'hexagon'],
['color' => 'red', 'shape' => 'hexagon'],
['color' => 'blue', 'shape' => 'triangle'],
]],
['type' => 'boat', 'wheels' => 'should be excluded'],
],
], [
// The blue wheels are excluded and are therefor not validated against the "in:square,round" rule
'vehicles.0.wheels.1.shape' => ['validation.in'],
'vehicles.0.wheels.2.shape' => ['validation.in'],
],
],
];
Expand Down

0 comments on commit 0ae3871

Please sign in to comment.