silverstripe/sapphire — pull request #737 by simonwelsh (2012-08-23 05:38:27+00:00)
Title: FIX Use array_intersect() with expected values so that the order matches

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.