Changing the number of book per pages changed the search with multiple database. Reported by At-Libitum. fix #124
This commit is contained in:
parent
e9620c977a
commit
002c7596ea
3 changed files with 18 additions and 3 deletions
|
@ -43,6 +43,21 @@ class PageMultiDatabaseTest extends PHPUnit_Framework_TestCase
|
|||
$qid = NULL;
|
||||
$n = "1";
|
||||
|
||||
// Issue 124
|
||||
$config['cops_max_item_per_page'] = 2;
|
||||
$currentPage = Page::getPage ($page, $qid, $query, $n);
|
||||
$currentPage->InitializeContent ();
|
||||
|
||||
|
||||
$this->assertEquals ("Search result for *art*", $currentPage->title);
|
||||
$this->assertCount (2, $currentPage->entryArray);
|
||||
$this->assertEquals ("Some books", $currentPage->entryArray [0]->title);
|
||||
$this->assertEquals ("10 books", $currentPage->entryArray [0]->content);
|
||||
$this->assertEquals ("One book", $currentPage->entryArray [1]->title);
|
||||
$this->assertEquals ("1 book", $currentPage->entryArray [1]->content);
|
||||
$this->assertFalse ($currentPage->ContainsBook ());
|
||||
|
||||
$config['cops_max_item_per_page'] = -1;
|
||||
$currentPage = Page::getPage ($page, $qid, $query, $n);
|
||||
$currentPage->InitializeContent ();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue