From 020e440faf36c7974030dce1effc93d1f3283b29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Lucas?= Date: Wed, 13 Nov 2013 10:32:43 +0100 Subject: [PATCH] New test for At Libitum's modifications. re #96 --- test/pageTest.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/pageTest.php b/test/pageTest.php index d5af42d..6587605 100644 --- a/test/pageTest.php +++ b/test/pageTest.php @@ -286,9 +286,22 @@ class PageTest extends PHPUnit_Framework_TestCase $n = "1"; $database = NULL; + $config['cops_titles_split_first_letter'] = 0; + $currentPage = Page::getPage ($page, $qid, $query, $n); $currentPage->InitializeContent (); + $this->assertEquals ("All books", $currentPage->title); + $this->assertCount (14, $currentPage->entryArray); + $this->assertEquals ("The Adventures of Sherlock Holmes", $currentPage->entryArray [0]->title); + $this->assertEquals ("Alice's Adventures in Wonderland", $currentPage->entryArray [1]->title); + $this->assertTrue ($currentPage->ContainsBook ()); + + $config['cops_titles_split_first_letter'] = 1; + + $currentPage = Page::getPage ($page, $qid, $query, $n); + $currentPage->InitializeContent (); + $this->assertEquals ("All books", $currentPage->title); $this->assertCount (9, $currentPage->entryArray); $this->assertEquals ("A", $currentPage->entryArray [0]->title);