LanguageNameIndexer/Search: use unicode aware lowercasing

With this MEÄNKELI with typos=1 finds results.

Updated test case for lowercased result. Renamed variables in test
file for clarity. Updated the default value for MW_INSTALL_PATH to
work with the default layout.

Change-Id: Id93c84d308705f55b4d2378fc8c7b7f243e1b53f
This commit is contained in:
Niklas Laxström
2016-06-15 10:13:49 +02:00
parent 920155fb18
commit 9daeacf1c5
5 changed files with 11 additions and 8 deletions

View File

@@ -19,12 +19,12 @@
*/
require_once __DIR__ . '/../../data/LanguageNameSearch.php';
class LanguageSearchTest extends PHPUnit_Framework_TestCase {
/**
* @dataProvider searchDataProvider
*/
public function testSearch( $searchKey, $result ) {
$this->assertEquals( $result, LanguageNameSearch::search( $searchKey, 1 ) );
public function testSearch( $searchKey, $expected ) {
$actual = LanguageNameSearch::search( $searchKey, 1 );
$this->assertEquals( $expected, $actual );
}
public function searchDataProvider() {
@@ -40,7 +40,7 @@ class LanguageSearchTest extends PHPUnit_Framework_TestCase {
]
],
[ 'Φινλαν', [
'fi' => 'Φινλανδικά',
'fi' => 'φινλανδικά',
]
],
[ 'blah', []