dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Remove "@author Bryan Davis" and "Brad Jorsch" annotations"
[lhc/web/wiklou.git]
/
tests
/
phpunit
/
includes
/
PrefixSearchTest.php
diff --git
a/tests/phpunit/includes/PrefixSearchTest.php
b/tests/phpunit/includes/PrefixSearchTest.php
index
31ee75b
..
a6cf14a
100644
(file)
--- a/
tests/phpunit/includes/PrefixSearchTest.php
+++ b/
tests/phpunit/includes/PrefixSearchTest.php
@@
-210,6
+210,11
@@
class PrefixSearchTest extends MediaWikiLangTestCase {
$namespaces = isset( $case['namespaces'] ) ? $case['namespaces'] : [];
$namespaces = isset( $case['namespaces'] ) ? $case['namespaces'] : [];
+ if ( wfGetDB( DB_REPLICA )->getType() === 'postgres' ) {
+ // Postgres will sort lexicographically on utf8 code units (" " before "/")
+ sort( $case['results'], SORT_STRING );
+ }
+
$searcher = new StringPrefixSearch;
$results = $searcher->search( $case['query'], 3, $namespaces );
$this->assertEquals(
$searcher = new StringPrefixSearch;
$results = $searcher->search( $case['query'], 3, $namespaces );
$this->assertEquals(
@@
-232,6
+237,11
@@
class PrefixSearchTest extends MediaWikiLangTestCase {
$searcher = new StringPrefixSearch;
$results = $searcher->search( $case['query'], 3, $namespaces, 1 );
$searcher = new StringPrefixSearch;
$results = $searcher->search( $case['query'], 3, $namespaces, 1 );
+ if ( wfGetDB( DB_REPLICA )->getType() === 'postgres' ) {
+ // Postgres will sort lexicographically on utf8 code units (" " before "/")
+ sort( $case['results'], SORT_STRING );
+ }
+
// We don't expect the first result when offsetting
array_shift( $case['results'] );
// And sometimes we expect a different last result
// We don't expect the first result when offsetting
array_shift( $case['results'] );
// And sometimes we expect a different last result