Last modified: 2012-07-31 09:53:52 UTC
In the tests SitesTest.php at line 92 the following line gives an error array( array( 'global_key' => array( 'enwiki', 'dewiki' ) ), array( 'enwiki', 'dewiki' ) ), while the following works array( array( 'global_key' => array( 'enwiki', 'dewiki' ) ), array( 'dewiki', 'enwiki' ) ), The order is changed in Sites, but does not seem to happen always. Later a similar line does not trigger any error.
What fails is the assertArrayEquals() in line 121, right? assertArrayEquals() should not care about the order of elements in the array (or the jeys, for that matter), unless you tell it to. There was in bug in assertArrayEquals() that made it fail if the order differed in some cases. I fixed that last friday. Please make sure you are using the latest version of the Wikidata branch that has the fix. The core fix was merged into master here: <https://gerrit.wikimedia.org/r/#/c/16754/>. I'll close this as "works for me". If it still happens for you with the newest version of the Wikidata branch (even if only "sometimes"), please repopen the bug.
I later heard that there was a fix in master branch of core, but it hadn't yet been included in the Wikidata branch. It seems like it is fixed now.