|
|
@@ -25,19 +25,19 @@ class PageTest extends PHPUnit_Framework_TestCase |
|
|
|
$this->assertEquals ($config['cops_title_default'], $currentPage->title); |
|
|
|
$this->assertCount (8, $currentPage->entryArray); |
|
|
|
$this->assertEquals ("Authors", $currentPage->entryArray [0]->title); |
|
|
|
$this->assertEquals ("Alphabetical index of the 5 authors", $currentPage->entryArray [0]->content); |
|
|
|
$this->assertEquals ("Alphabetical index of the 6 authors", $currentPage->entryArray [0]->content); |
|
|
|
$this->assertEquals ("Series", $currentPage->entryArray [1]->title); |
|
|
|
$this->assertEquals ("Alphabetical index of the 3 series", $currentPage->entryArray [1]->content); |
|
|
|
$this->assertEquals ("Alphabetical index of the 4 series", $currentPage->entryArray [1]->content); |
|
|
|
$this->assertEquals ("Publishers", $currentPage->entryArray [2]->title); |
|
|
|
$this->assertEquals ("Alphabetical index of the 5 publishers", $currentPage->entryArray [2]->content); |
|
|
|
$this->assertEquals ("Alphabetical index of the 6 publishers", $currentPage->entryArray [2]->content); |
|
|
|
$this->assertEquals ("Tags", $currentPage->entryArray [3]->title); |
|
|
|
$this->assertEquals ("Alphabetical index of the 10 tags", $currentPage->entryArray [3]->content); |
|
|
|
$this->assertEquals ("Alphabetical index of the 11 tags", $currentPage->entryArray [3]->content); |
|
|
|
$this->assertEquals ("Ratings", $currentPage->entryArray [4]->title); |
|
|
|
$this->assertEquals ("3 ratings", $currentPage->entryArray [4]->content); |
|
|
|
$this->assertEquals ("Languages", $currentPage->entryArray [5]->title); |
|
|
|
$this->assertEquals ("Alphabetical index of the single language", $currentPage->entryArray [5]->content); |
|
|
|
$this->assertEquals ("Alphabetical index of the 2 languages", $currentPage->entryArray [5]->content); |
|
|
|
$this->assertEquals ("All books", $currentPage->entryArray [6]->title); |
|
|
|
$this->assertEquals ("Alphabetical index of the 14 books", $currentPage->entryArray [6]->content); |
|
|
|
$this->assertEquals ("Alphabetical index of the 15 books", $currentPage->entryArray [6]->content); |
|
|
|
$this->assertEquals ("Recent additions", $currentPage->entryArray [7]->title); |
|
|
|
$this->assertEquals ("50 most recent books", $currentPage->entryArray [7]->content); |
|
|
|
$this->assertFalse ($currentPage->ContainsBook ()); |
|
|
@@ -60,7 +60,7 @@ class PageTest extends PHPUnit_Framework_TestCase |
|
|
|
$this->assertCount (3, $currentPage->entryArray); |
|
|
|
$this->assertEquals ("Ratings", $currentPage->entryArray [0]->title); |
|
|
|
$this->assertEquals ("All books", $currentPage->entryArray [1]->title); |
|
|
|
$this->assertEquals ("Alphabetical index of the 14 books", $currentPage->entryArray [1]->content); |
|
|
|
$this->assertEquals ("Alphabetical index of the 15 books", $currentPage->entryArray [1]->content); |
|
|
|
$this->assertEquals ("Recent additions", $currentPage->entryArray [2]->title); |
|
|
|
$this->assertEquals ("50 most recent books", $currentPage->entryArray [2]->content); |
|
|
|
$this->assertFalse ($currentPage->ContainsBook ()); |
|
|
@@ -207,7 +207,7 @@ class PageTest extends PHPUnit_Framework_TestCase |
|
|
|
$currentPage->InitializeContent (); |
|
|
|
|
|
|
|
$this->assertEquals ("Authors", $currentPage->title); |
|
|
|
$this->assertCount (5, $currentPage->entryArray); |
|
|
|
$this->assertCount (6, $currentPage->entryArray); |
|
|
|
$this->assertEquals ("Carroll, Lewis", $currentPage->entryArray [0]->title); |
|
|
|
$this->assertFalse ($currentPage->ContainsBook ()); |
|
|
|
|
|
|
@@ -217,7 +217,7 @@ class PageTest extends PHPUnit_Framework_TestCase |
|
|
|
$currentPage->InitializeContent (); |
|
|
|
|
|
|
|
$this->assertEquals ("Authors", $currentPage->title); |
|
|
|
$this->assertCount (4, $currentPage->entryArray); |
|
|
|
$this->assertCount (5, $currentPage->entryArray); |
|
|
|
$this->assertEquals ("C", $currentPage->entryArray [0]->title); |
|
|
|
$this->assertFalse ($currentPage->ContainsBook ()); |
|
|
|
} |
|
|
@@ -301,7 +301,7 @@ class PageTest extends PHPUnit_Framework_TestCase |
|
|
|
$currentPage->InitializeContent (); |
|
|
|
|
|
|
|
$this->assertEquals ("All books", $currentPage->title); |
|
|
|
$this->assertCount (14, $currentPage->entryArray); |
|
|
|
$this->assertCount (15, $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 ()); |
|
|
@@ -328,8 +328,8 @@ class PageTest extends PHPUnit_Framework_TestCase |
|
|
|
$currentPage = Page::getPage ($page, $qid, $query, $n); |
|
|
|
$currentPage->InitializeContent (); |
|
|
|
|
|
|
|
$this->assertEquals ("2 books starting with C", $currentPage->title); |
|
|
|
$this->assertCount (2, $currentPage->entryArray); |
|
|
|
$this->assertEquals ("3 books starting with C", $currentPage->title); |
|
|
|
$this->assertCount (3, $currentPage->entryArray); |
|
|
|
$this->assertEquals ("The Call of the Wild", $currentPage->entryArray [0]->title); |
|
|
|
$this->assertTrue ($currentPage->ContainsBook ()); |
|
|
|
} |
|
|
@@ -345,7 +345,7 @@ class PageTest extends PHPUnit_Framework_TestCase |
|
|
|
$currentPage->InitializeContent (); |
|
|
|
|
|
|
|
$this->assertEquals ("Series", $currentPage->title); |
|
|
|
$this->assertCount (3, $currentPage->entryArray); |
|
|
|
$this->assertCount (4, $currentPage->entryArray); |
|
|
|
$this->assertEquals ("D'Artagnan Romances", $currentPage->entryArray [0]->title); |
|
|
|
$this->assertFalse ($currentPage->ContainsBook ()); |
|
|
|
} |
|
|
@@ -376,7 +376,7 @@ class PageTest extends PHPUnit_Framework_TestCase |
|
|
|
$currentPage->InitializeContent (); |
|
|
|
|
|
|
|
$this->assertEquals ("Publishers", $currentPage->title); |
|
|
|
$this->assertCount (5, $currentPage->entryArray); |
|
|
|
$this->assertCount (6, $currentPage->entryArray); |
|
|
|
$this->assertEquals ("D. Appleton and Company", $currentPage->entryArray [0]->title); |
|
|
|
$this->assertFalse ($currentPage->ContainsBook ()); |
|
|
|
} |
|
|
@@ -409,7 +409,7 @@ class PageTest extends PHPUnit_Framework_TestCase |
|
|
|
$currentPage->InitializeContent (); |
|
|
|
|
|
|
|
$this->assertEquals ("Tags", $currentPage->title); |
|
|
|
$this->assertCount (10, $currentPage->entryArray); |
|
|
|
$this->assertCount (11, $currentPage->entryArray); |
|
|
|
$this->assertEquals ("Action & Adventure", $currentPage->entryArray [0]->title); |
|
|
|
$this->assertFalse ($currentPage->ContainsBook ()); |
|
|
|
} |
|
|
@@ -441,8 +441,9 @@ class PageTest extends PHPUnit_Framework_TestCase |
|
|
|
$currentPage->InitializeContent (); |
|
|
|
|
|
|
|
$this->assertEquals ("Languages", $currentPage->title); |
|
|
|
$this->assertCount (1, $currentPage->entryArray); |
|
|
|
$this->assertCount (2, $currentPage->entryArray); |
|
|
|
$this->assertEquals ("English", $currentPage->entryArray [0]->title); |
|
|
|
$this->assertEquals ("French", $currentPage->entryArray [1]->title); |
|
|
|
$this->assertFalse ($currentPage->ContainsBook ()); |
|
|
|
} |
|
|
|
|
|
|
@@ -505,8 +506,8 @@ class PageTest extends PHPUnit_Framework_TestCase |
|
|
|
$currentPage->InitializeContent (); |
|
|
|
|
|
|
|
$this->assertEquals ("Recent additions", $currentPage->title); |
|
|
|
$this->assertCount (14, $currentPage->entryArray); |
|
|
|
$this->assertEquals ("Alice's Adventures in Wonderland", $currentPage->entryArray [0]->title); |
|
|
|
$this->assertCount (15, $currentPage->entryArray); |
|
|
|
$this->assertEquals ("La curée", $currentPage->entryArray [0]->title); |
|
|
|
$this->assertTrue ($currentPage->ContainsBook ()); |
|
|
|
|
|
|
|
// Test facets |
|
|
@@ -525,8 +526,8 @@ class PageTest extends PHPUnit_Framework_TestCase |
|
|
|
$currentPage->InitializeContent (); |
|
|
|
|
|
|
|
$this->assertEquals ("Recent additions", $currentPage->title); |
|
|
|
$this->assertCount (12, $currentPage->entryArray); |
|
|
|
$this->assertEquals ("Alice's Adventures in Wonderland", $currentPage->entryArray [0]->title); |
|
|
|
$this->assertCount (13, $currentPage->entryArray); |
|
|
|
$this->assertEquals ("La curée", $currentPage->entryArray [0]->title); |
|
|
|
$this->assertTrue ($currentPage->ContainsBook ()); |
|
|
|
|
|
|
|
$_GET["tag"] = NULL; |
|
|
|