From aca14938ca49e8a80e1487fde77501f8ab269fef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Lucas?= Date: Tue, 22 Oct 2013 10:32:22 +0200 Subject: [PATCH] New tests again for custom columns. re #96 --- test/pageTest.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/test/pageTest.php b/test/pageTest.php index 6fdf2a6..3a0d4a0 100644 --- a/test/pageTest.php +++ b/test/pageTest.php @@ -145,6 +145,26 @@ class PageTest extends PHPUnit_Framework_TestCase $this->assertEquals ("Alice's Adventures in Wonderland", $currentPage->entryArray [0]->title); $this->assertTrue ($currentPage->ContainsBook ()); + $_GET ["custom"] = "2"; + + $currentPage = Page::getPage ($page, $qid, $query, $n); + $currentPage->InitializeContent (); + + $this->assertEquals ("tag1", $currentPage->title); + $this->assertCount (2, $currentPage->entryArray); + $this->assertEquals ("Alice's Adventures in Wonderland", $currentPage->entryArray [0]->title); + $this->assertTrue ($currentPage->ContainsBook ()); + + $_GET ["custom"] = "3"; + $qid = "2"; + + $currentPage = Page::getPage ($page, $qid, $query, $n); + $currentPage->InitializeContent (); + + $this->assertEquals ("other", $currentPage->title); + $this->assertCount (1, $currentPage->entryArray); + $this->assertEquals ("A Study in Scarlet", $currentPage->entryArray [0]->title); + $this->assertTrue ($currentPage->ContainsBook ()); $_GET ["custom"] = NULL; }