comparator
comparator copied to clipboard
Issue #77: Canonicalizing associative arrays is now done by using ksort instead of sort
This covers issue #77 which is also the cause for PHPUnit Issues #4455.
The first change is in "src/ArrayComparator.php" where we first detect if the expected array has any non-integer keys. If that is the case, we treat both arrays as associative and sort them with ksort() instead of sort().
The second change is test coverage of the above logic in "tests/ArrayComparatorTest.php".