Sort results before comparison, as search is not guaranteed to return results in...
authorBrion Vibber <brion@users.mediawiki.org>
Thu, 28 Oct 2004 02:01:57 +0000 (02:01 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Thu, 28 Oct 2004 02:01:57 +0000 (02:01 +0000)
tests/SearchEngineTest.php

index 3e04025..0a04bf4 100644 (file)
@@ -51,6 +51,10 @@ END
                        $matches[] = IntVal( $row->cur_id );
                }
                $results->free();
+               # Search is not guaranteed to return results in a certain order;
+               # sort them numerically so we will compare simply that we received
+               # the expected matches.
+               sort( $matches );
                return $matches;
        }