Allow normalized search (without diacritics) it should also fix the case problem with non latin languages (cyrillic).

The last part is not tested.

disclaimer : Slow !

re #49, #48
This commit is contained in:
Sébastien Lucas 2014-05-03 17:57:06 +02:00
parent 23fcc4d641
commit 78d42b48e2
5 changed files with 148 additions and 7 deletions

View file

@ -669,16 +669,21 @@ class PageTest extends PHPUnit_Framework_TestCase
$query = "curee";
$qid = NULL;
$n = "1";
$config ['cops_normalized_search'] = "1";
if (!useNormAndUp ()) {
$this->markTestIncomplete();
}
$currentPage = Page::getPage ($page, $qid, $query, $n);
$currentPage->InitializeContent ();
$this->markTestIncomplete();
$this->assertEquals ("Search result for *curee*", $currentPage->title);
$this->assertCount (1, $currentPage->entryArray);
$this->assertEquals ("Search result for *curee* in books", $currentPage->entryArray [0]->title);
$this->assertEquals ("1 book", $currentPage->entryArray [0]->content);
$this->assertFalse ($currentPage->ContainsBook ());
$config ['cops_normalized_search'] = "0";
}
public function testAuthorSearch_ByName ()