more test functions

This commit is contained in:
Sébastien Lucas 2014-04-30 14:26:25 +02:00
parent a9125cacd5
commit d45bbb7ff6

View file

@ -193,7 +193,7 @@ class PageTest extends PHPUnit_Framework_TestCase
$_GET ["custom"] = NULL; $_GET ["custom"] = NULL;
} }
public function testPageAllAuthors () public function testPageAllAuthors_WithFullName ()
{ {
global $config; global $config;
$page = Base::PAGE_ALL_AUTHORS; $page = Base::PAGE_ALL_AUTHORS;
@ -212,6 +212,15 @@ class PageTest extends PHPUnit_Framework_TestCase
$this->assertFalse ($currentPage->ContainsBook ()); $this->assertFalse ($currentPage->ContainsBook ());
$config['cops_author_split_first_letter'] = "1"; $config['cops_author_split_first_letter'] = "1";
}
public function testPageAllAuthors_SplittedByFirstLetter ()
{
global $config;
$page = Base::PAGE_ALL_AUTHORS;
$query = NULL;
$qid = NULL;
$n = "1";
$currentPage = Page::getPage ($page, $qid, $query, $n); $currentPage = Page::getPage ($page, $qid, $query, $n);
$currentPage->InitializeContent (); $currentPage->InitializeContent ();
@ -287,7 +296,7 @@ class PageTest extends PHPUnit_Framework_TestCase
$this->assertFalse ($currentPage->IsPaginated ()); $this->assertFalse ($currentPage->IsPaginated ());
} }
public function testPageAllBooks () public function testPageAllBooks_WithFullName ()
{ {
global $config; global $config;
$page = Base::PAGE_ALL_BOOKS; $page = Base::PAGE_ALL_BOOKS;
@ -307,6 +316,15 @@ class PageTest extends PHPUnit_Framework_TestCase
$this->assertTrue ($currentPage->ContainsBook ()); $this->assertTrue ($currentPage->ContainsBook ());
$config['cops_titles_split_first_letter'] = 1; $config['cops_titles_split_first_letter'] = 1;
}
public function testPageAllBooks_SplittedByFirstLetter ()
{
global $config;
$page = Base::PAGE_ALL_BOOKS;
$query = NULL;
$qid = NULL;
$n = "1";
$currentPage = Page::getPage ($page, $qid, $query, $n); $currentPage = Page::getPage ($page, $qid, $query, $n);
$currentPage->InitializeContent (); $currentPage->InitializeContent ();