Add series pages. re #96

This commit is contained in:
Sébastien Lucas 2013-10-12 08:19:18 +02:00
parent 72406214f9
commit 1c2bb4ede3

View file

@ -175,4 +175,42 @@ class PageTest extends PHPUnit_Framework_TestCase
$this->assertTrue ($currentPage->ContainsBook ());
}
public function testPageAllSeries ()
{
global $config;
$page = Base::PAGE_ALL_SERIES;
$query = NULL;
$search = NULL;
$qid = NULL;
$n = "1";
$database = NULL;
$currentPage = Page::getPage ($page, $qid, $query, $n);
$currentPage->InitializeContent ();
$this->assertEquals ("Series", $currentPage->title);
$this->assertCount (3, $currentPage->entryArray);
$this->assertEquals ("D'Artagnan Romances", $currentPage->entryArray [0]->title);
$this->assertFalse ($currentPage->ContainsBook ());
}
public function testPageSeriesDetail ()
{
global $config;
$page = Base::PAGE_SERIE_DETAIL;
$query = NULL;
$search = NULL;
$qid = "1";
$n = "1";
$database = NULL;
$currentPage = Page::getPage ($page, $qid, $query, $n);
$currentPage->InitializeContent ();
$this->assertEquals ("Sherlock Holmes", $currentPage->title);
$this->assertCount (7, $currentPage->entryArray);
$this->assertEquals ("A Study in Scarlet", $currentPage->entryArray [0]->title);
$this->assertTrue ($currentPage->ContainsBook ());
}
}