From 1c2bb4ede381cc47e38475163d5f98fd3d259fdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Lucas?= Date: Sat, 12 Oct 2013 08:19:18 +0200 Subject: [PATCH] Add series pages. re #96 --- test/pageTest.php | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/test/pageTest.php b/test/pageTest.php index 8756bb9..5fd7ddf 100644 --- a/test/pageTest.php +++ b/test/pageTest.php @@ -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 ()); + } + } \ No newline at end of file