Merge "Pass delimiter to preg_quote"
[lhc/web/wiklou.git] / tests / phpunit / mocks / search / MockCompletionSearchEngine.php
index ac8a5dc..13d16df 100644 (file)
@@ -27,11 +27,12 @@ class MockCompletionSearchEngine extends SearchEngine {
         */
        public static function addMockResults( $query, array $result ) {
                // Leading : ensures we don't treat another : as a namespace separator
-               $normalized = Title::newFromText( ":$query" )->getText();
+               $normalized = mb_strtolower( Title::newFromText( ":$query" )->getText() );
                self::$results[$normalized] = $result;
        }
 
        public function completionSearchBackend( $search ) {
+               $search = mb_strtolower( $search );
                if ( !isset( self::$results[$search] ) ) {
                        return SearchSuggestionSet::emptySuggestionSet();
                }