Add a new test for normalized search (todo)
This commit is contained in:
parent
68d8282a98
commit
da86b9d840
|
@ -600,7 +600,6 @@ class PageTest extends PHPUnit_Framework_TestCase
|
|||
$qid = NULL;
|
||||
$n = "1";
|
||||
|
||||
// Only books returned
|
||||
$currentPage = Page::getPage ($page, $qid, $query, $n);
|
||||
$currentPage->InitializeContent ();
|
||||
|
||||
|
@ -611,6 +610,25 @@ class PageTest extends PHPUnit_Framework_TestCase
|
|||
$this->assertFalse ($currentPage->ContainsBook ());
|
||||
}
|
||||
|
||||
public function testPageSearch_WithNormalizedSearch ()
|
||||
{
|
||||
global $config;
|
||||
$page = Base::PAGE_OPENSEARCH_QUERY;
|
||||
$query = "curee";
|
||||
$qid = NULL;
|
||||
$n = "1";
|
||||
|
||||
$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 ());
|
||||
}
|
||||
|
||||
public function testPageSearchScopeAuthors ()
|
||||
{
|
||||
$page = Base::PAGE_OPENSEARCH_QUERY;
|
||||
|
|
Loading…
Reference in a new issue