mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
cd61b61a84
The values in $values aren't returned in any order, so this test can randomly fail. This changes the check from expected = $values to $values \cap expected = $value. PHP's array_intersect maintains the keys of the first array, so order is preserved. The intersect also guarentees that the only accepted values are the expected ones.