sebastianbergmann / comparator

Provides the functionality to compare PHP values for equality.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ArrayComparator ignores order

luckydonald opened this issue · comments

Even with $canonicalize = false.

$expected = [
	"first" => "lel",
	"middle" => "hurr",
	"last" => "lol",
];
$different = [  // just to make sure the assert checks the sorting.
	"first" => "lel",
	"last" => "lol",
	"middle" => "hurr",
];


$comparator = SebastianBergmann\Comparator\ArrayComparator();
$comparator->assertEquals($expected, $different);

This should fail. But it doesn't.

commented

This issue has been automatically marked as stale because it has not had activity within the last 60 days. It will be closed after 7 days if no further activity occurs. Thank you for your contributions.

commented

This issue has been automatically closed because it has not had activity since it was marked as stale. Thank you for your contributions.