From a9125cacd5c432a2eed371dd9bceb13349bd9cca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Lucas?= Date: Wed, 30 Apr 2014 14:16:42 +0200 Subject: [PATCH] more test functions --- test/pageTest.php | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/test/pageTest.php b/test/pageTest.php index 0a77d9b..1638a8f 100644 --- a/test/pageTest.php +++ b/test/pageTest.php @@ -509,8 +509,14 @@ class PageTest extends PHPUnit_Framework_TestCase $this->assertCount (15, $currentPage->entryArray); $this->assertEquals ("La curée", $currentPage->entryArray [0]->title); $this->assertTrue ($currentPage->ContainsBook ()); + } - // Test facets + public function testPageRecent_WithFacets_IncludedTag () + { + $page = Base::PAGE_ALL_RECENT_BOOKS; + $query = NULL; + $qid = NULL; + $n = "1"; $_GET["tag"] = "Historical"; $currentPage = Page::getPage ($page, $qid, $query, $n); @@ -521,6 +527,16 @@ class PageTest extends PHPUnit_Framework_TestCase $this->assertEquals ("Twenty Years After", $currentPage->entryArray [0]->title); $this->assertTrue ($currentPage->ContainsBook ()); + $_GET["tag"] = NULL; + } + + public function testPageRecent_WithFacets_ExcludedTag () + { + $page = Base::PAGE_ALL_RECENT_BOOKS; + $query = NULL; + $qid = NULL; + $n = "1"; + $_GET["tag"] = "!Romance"; $currentPage = Page::getPage ($page, $qid, $query, $n); $currentPage->InitializeContent ();