This commit is contained in:
Sébastien Lucas 2013-11-26 18:03:40 +01:00
commit 53376f2e3b
2 changed files with 1 additions and 50 deletions

View file

@ -18,10 +18,8 @@ class PageMultiDatabaseTest extends PHPUnit_Framework_TestCase
"One book" => dirname(__FILE__) . "/BaseWithOneBook/"); "One book" => dirname(__FILE__) . "/BaseWithOneBook/");
$page = Base::PAGE_INDEX; $page = Base::PAGE_INDEX;
$query = NULL; $query = NULL;
$search = NULL;
$qid = NULL; $qid = NULL;
$n = "1"; $n = "1";
$database = NULL;
$currentPage = Page::getPage ($page, $qid, $query, $n); $currentPage = Page::getPage ($page, $qid, $query, $n);
$currentPage->InitializeContent (); $currentPage->InitializeContent ();
@ -42,10 +40,8 @@ class PageMultiDatabaseTest extends PHPUnit_Framework_TestCase
"One book" => dirname(__FILE__) . "/BaseWithOneBook/"); "One book" => dirname(__FILE__) . "/BaseWithOneBook/");
$page = Base::PAGE_OPENSEARCH_QUERY; $page = Base::PAGE_OPENSEARCH_QUERY;
$query = "art"; $query = "art";
$search = NULL;
$qid = NULL; $qid = NULL;
$n = "1"; $n = "1";
$database = NULL;
$currentPage = Page::getPage ($page, $qid, $query, $n); $currentPage = Page::getPage ($page, $qid, $query, $n);
$currentPage->InitializeContent (); $currentPage->InitializeContent ();

View file

@ -16,10 +16,8 @@ class PageTest extends PHPUnit_Framework_TestCase
global $config; global $config;
$page = Base::PAGE_INDEX; $page = Base::PAGE_INDEX;
$query = NULL; $query = NULL;
$search = NULL;
$qid = NULL; $qid = NULL;
$n = "1"; $n = "1";
$database = NULL;
$currentPage = Page::getPage ($page, $qid, $query, $n); $currentPage = Page::getPage ($page, $qid, $query, $n);
$currentPage->InitializeContent (); $currentPage->InitializeContent ();
@ -46,10 +44,8 @@ class PageTest extends PHPUnit_Framework_TestCase
global $config; global $config;
$page = Base::PAGE_INDEX; $page = Base::PAGE_INDEX;
$query = NULL; $query = NULL;
$search = NULL;
$qid = NULL; $qid = NULL;
$n = "1"; $n = "1";
$database = NULL;
$config['cops_calibre_custom_column'] = array ("type1"); $config['cops_calibre_custom_column'] = array ("type1");
@ -93,10 +89,8 @@ class PageTest extends PHPUnit_Framework_TestCase
global $config; global $config;
$page = Base::PAGE_ALL_CUSTOMS; $page = Base::PAGE_ALL_CUSTOMS;
$query = NULL; $query = NULL;
$search = NULL;
$qid = NULL; $qid = NULL;
$n = "1"; $n = "1";
$database = NULL;
$_GET ["custom"] = "1"; $_GET ["custom"] = "1";
@ -136,10 +130,8 @@ class PageTest extends PHPUnit_Framework_TestCase
global $config; global $config;
$page = Base::PAGE_CUSTOM_DETAIL; $page = Base::PAGE_CUSTOM_DETAIL;
$query = NULL; $query = NULL;
$search = NULL;
$qid = "1"; $qid = "1";
$n = "1"; $n = "1";
$database = NULL;
$_GET ["custom"] = "1"; $_GET ["custom"] = "1";
@ -180,10 +172,8 @@ class PageTest extends PHPUnit_Framework_TestCase
global $config; global $config;
$page = Base::PAGE_ALL_AUTHORS; $page = Base::PAGE_ALL_AUTHORS;
$query = NULL; $query = NULL;
$search = NULL;
$qid = NULL; $qid = NULL;
$n = "1"; $n = "1";
$database = NULL;
$config['cops_author_split_first_letter'] = "0"; $config['cops_author_split_first_letter'] = "0";
@ -211,10 +201,8 @@ class PageTest extends PHPUnit_Framework_TestCase
global $config; global $config;
$page = Base::PAGE_AUTHORS_FIRST_LETTER; $page = Base::PAGE_AUTHORS_FIRST_LETTER;
$query = NULL; $query = NULL;
$search = NULL;
$qid = "C"; $qid = "C";
$n = "1"; $n = "1";
$database = NULL;
// Author Lewis Carroll // Author Lewis Carroll
$currentPage = Page::getPage ($page, $qid, $query, $n); $currentPage = Page::getPage ($page, $qid, $query, $n);
@ -230,10 +218,8 @@ class PageTest extends PHPUnit_Framework_TestCase
global $config; global $config;
$page = Base::PAGE_AUTHOR_DETAIL; $page = Base::PAGE_AUTHOR_DETAIL;
$query = NULL; $query = NULL;
$search = NULL;
$qid = "1"; $qid = "1";
$n = "1"; $n = "1";
$database = NULL;
$_SERVER['QUERY_STRING'] = "page=" . Base::PAGE_AUTHOR_DETAIL . "&id=1&n=1"; $_SERVER['QUERY_STRING'] = "page=" . Base::PAGE_AUTHOR_DETAIL . "&id=1&n=1";
$config['cops_max_item_per_page'] = 2; $config['cops_max_item_per_page'] = 2;
@ -281,10 +267,8 @@ class PageTest extends PHPUnit_Framework_TestCase
global $config; global $config;
$page = Base::PAGE_ALL_BOOKS; $page = Base::PAGE_ALL_BOOKS;
$query = NULL; $query = NULL;
$search = NULL;
$qid = NULL; $qid = NULL;
$n = "1"; $n = "1";
$database = NULL;
$config['cops_titles_split_first_letter'] = 0; $config['cops_titles_split_first_letter'] = 0;
@ -314,10 +298,8 @@ class PageTest extends PHPUnit_Framework_TestCase
global $config; global $config;
$page = Base::PAGE_ALL_BOOKS_LETTER; $page = Base::PAGE_ALL_BOOKS_LETTER;
$query = NULL; $query = NULL;
$search = NULL;
$qid = "C"; $qid = "C";
$n = "1"; $n = "1";
$database = NULL;
$currentPage = Page::getPage ($page, $qid, $query, $n); $currentPage = Page::getPage ($page, $qid, $query, $n);
$currentPage->InitializeContent (); $currentPage->InitializeContent ();
@ -333,10 +315,8 @@ class PageTest extends PHPUnit_Framework_TestCase
global $config; global $config;
$page = Base::PAGE_ALL_SERIES; $page = Base::PAGE_ALL_SERIES;
$query = NULL; $query = NULL;
$search = NULL;
$qid = NULL; $qid = NULL;
$n = "1"; $n = "1";
$database = NULL;
$currentPage = Page::getPage ($page, $qid, $query, $n); $currentPage = Page::getPage ($page, $qid, $query, $n);
$currentPage->InitializeContent (); $currentPage->InitializeContent ();
@ -352,11 +332,8 @@ class PageTest extends PHPUnit_Framework_TestCase
global $config; global $config;
$page = Base::PAGE_SERIE_DETAIL; $page = Base::PAGE_SERIE_DETAIL;
$query = NULL; $query = NULL;
$search = NULL;
$qid = "1"; $qid = "1";
$n = "1"; $n = "1";
$database = NULL;
$currentPage = Page::getPage ($page, $qid, $query, $n); $currentPage = Page::getPage ($page, $qid, $query, $n);
$currentPage->InitializeContent (); $currentPage->InitializeContent ();
@ -371,10 +348,8 @@ class PageTest extends PHPUnit_Framework_TestCase
global $config; global $config;
$page = Base::PAGE_ALL_TAGS; $page = Base::PAGE_ALL_TAGS;
$query = NULL; $query = NULL;
$search = NULL;
$qid = NULL; $qid = NULL;
$n = "1"; $n = "1";
$database = NULL;
$currentPage = Page::getPage ($page, $qid, $query, $n); $currentPage = Page::getPage ($page, $qid, $query, $n);
$currentPage->InitializeContent (); $currentPage->InitializeContent ();
@ -390,10 +365,8 @@ class PageTest extends PHPUnit_Framework_TestCase
global $config; global $config;
$page = Base::PAGE_TAG_DETAIL; $page = Base::PAGE_TAG_DETAIL;
$query = NULL; $query = NULL;
$search = NULL;
$qid = "1"; $qid = "1";
$n = "1"; $n = "1";
$database = NULL;
$currentPage = Page::getPage ($page, $qid, $query, $n); $currentPage = Page::getPage ($page, $qid, $query, $n);
$currentPage->InitializeContent (); $currentPage->InitializeContent ();
@ -409,10 +382,8 @@ class PageTest extends PHPUnit_Framework_TestCase
global $config; global $config;
$page = Base::PAGE_ALL_LANGUAGES; $page = Base::PAGE_ALL_LANGUAGES;
$query = NULL; $query = NULL;
$search = NULL;
$qid = NULL; $qid = NULL;
$n = "1"; $n = "1";
$database = NULL;
$currentPage = Page::getPage ($page, $qid, $query, $n); $currentPage = Page::getPage ($page, $qid, $query, $n);
$currentPage->InitializeContent (); $currentPage->InitializeContent ();
@ -428,10 +399,8 @@ class PageTest extends PHPUnit_Framework_TestCase
global $config; global $config;
$page = Base::PAGE_LANGUAGE_DETAIL; $page = Base::PAGE_LANGUAGE_DETAIL;
$query = NULL; $query = NULL;
$search = NULL;
$qid = "1"; $qid = "1";
$n = "1"; $n = "1";
$database = NULL;
$currentPage = Page::getPage ($page, $qid, $query, $n); $currentPage = Page::getPage ($page, $qid, $query, $n);
$currentPage->InitializeContent (); $currentPage->InitializeContent ();
@ -447,10 +416,8 @@ class PageTest extends PHPUnit_Framework_TestCase
global $config; global $config;
$page = Base::PAGE_ALL_RECENT_BOOKS; $page = Base::PAGE_ALL_RECENT_BOOKS;
$query = NULL; $query = NULL;
$search = NULL;
$qid = NULL; $qid = NULL;
$n = "1"; $n = "1";
$database = NULL;
$currentPage = Page::getPage ($page, $qid, $query, $n); $currentPage = Page::getPage ($page, $qid, $query, $n);
$currentPage->InitializeContent (); $currentPage->InitializeContent ();
@ -488,10 +455,8 @@ class PageTest extends PHPUnit_Framework_TestCase
global $config; global $config;
$page = Base::PAGE_BOOK_DETAIL; $page = Base::PAGE_BOOK_DETAIL;
$query = NULL; $query = NULL;
$search = NULL;
$qid = "2"; $qid = "2";
$n = "1"; $n = "1";
$database = NULL;
$currentPage = Page::getPage ($page, $qid, $query, $n); $currentPage = Page::getPage ($page, $qid, $query, $n);
$currentPage->InitializeContent (); $currentPage->InitializeContent ();
@ -506,10 +471,8 @@ class PageTest extends PHPUnit_Framework_TestCase
global $config; global $config;
$page = Base::PAGE_OPENSEARCH_QUERY; $page = Base::PAGE_OPENSEARCH_QUERY;
$query = "alice"; $query = "alice";
$search = NULL;
$qid = NULL; $qid = NULL;
$n = "1"; $n = "1";
$database = NULL;
// Only books returned // Only books returned
$currentPage = Page::getPage ($page, $qid, $query, $n); $currentPage = Page::getPage ($page, $qid, $query, $n);
@ -538,10 +501,8 @@ class PageTest extends PHPUnit_Framework_TestCase
{ {
global $config; global $config;
$page = Base::PAGE_OPENSEARCH_QUERY; $page = Base::PAGE_OPENSEARCH_QUERY;
$search = NULL;
$qid = NULL; $qid = NULL;
$n = "1"; $n = "1";
$database = NULL;
$_GET ["scope"] = "author"; $_GET ["scope"] = "author";
// Match Lewis Carroll // Match Lewis Carroll
@ -561,10 +522,8 @@ class PageTest extends PHPUnit_Framework_TestCase
{ {
global $config; global $config;
$page = Base::PAGE_OPENSEARCH_QUERY; $page = Base::PAGE_OPENSEARCH_QUERY;
$search = NULL;
$qid = NULL; $qid = NULL;
$n = "1"; $n = "1";
$database = NULL;
$_GET ["scope"] = "series"; $_GET ["scope"] = "series";
// Match Holmes // Match Holmes
@ -584,10 +543,8 @@ class PageTest extends PHPUnit_Framework_TestCase
{ {
global $config; global $config;
$page = Base::PAGE_OPENSEARCH_QUERY; $page = Base::PAGE_OPENSEARCH_QUERY;
$search = NULL;
$qid = NULL; $qid = NULL;
$n = "1"; $n = "1";
$database = NULL;
$_GET ["scope"] = "book"; $_GET ["scope"] = "book";
// Match Holmes // Match Holmes
@ -606,10 +563,8 @@ class PageTest extends PHPUnit_Framework_TestCase
{ {
global $config; global $config;
$page = Base::PAGE_OPENSEARCH_QUERY; $page = Base::PAGE_OPENSEARCH_QUERY;
$search = NULL;
$qid = NULL; $qid = NULL;
$n = "1"; $n = "1";
$database = NULL;
$_GET ["scope"] = "tag"; $_GET ["scope"] = "tag";
// Match Holmes // Match Holmes