From: Brion Vibber Date: Thu, 28 Oct 2004 02:01:57 +0000 (+0000) Subject: Sort results before comparison, as search is not guaranteed to return results in... X-Git-Tag: 1.5.0alpha1~1430 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22articles%22%2C%22id_article=%24ze_article%22%29%20.%20%22?a=commitdiff_plain;h=e1ef8b49c7700e8c8039b12aaabd16464ca3fb8f;p=lhc%2Fweb%2Fwiklou.git Sort results before comparison, as search is not guaranteed to return results in a particular result. --- diff --git a/tests/SearchEngineTest.php b/tests/SearchEngineTest.php index 3e040250d8..0a04bf478e 100644 --- a/tests/SearchEngineTest.php +++ b/tests/SearchEngineTest.php @@ -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; }