Browse Source

Add a new test for normalized search (todo)

master
Sébastien Lucas 10 years ago
parent
commit
da86b9d840
1 changed files with 19 additions and 1 deletions
  1. +19
    -1
      test/pageTest.php

+ 19
- 1
test/pageTest.php View File

@@ -600,7 +600,6 @@ class PageTest extends PHPUnit_Framework_TestCase
$qid = NULL;
$n = "1";

// Only books returned
$currentPage = Page::getPage ($page, $qid, $query, $n);
$currentPage->InitializeContent ();

@@ -611,6 +610,25 @@ class PageTest extends PHPUnit_Framework_TestCase
$this->assertFalse ($currentPage->ContainsBook ());
}

public function testPageSearch_WithNormalizedSearch ()
{
global $config;
$page = Base::PAGE_OPENSEARCH_QUERY;
$query = "curee";
$qid = NULL;
$n = "1";

$currentPage = Page::getPage ($page, $qid, $query, $n);
$currentPage->InitializeContent ();

$this->markTestIncomplete();
$this->assertEquals ("Search result for *curee*", $currentPage->title);
$this->assertCount (1, $currentPage->entryArray);
$this->assertEquals ("Search result for *curee* in books", $currentPage->entryArray [0]->title);
$this->assertEquals ("1 book", $currentPage->entryArray [0]->content);
$this->assertFalse ($currentPage->ContainsBook ());
}

public function testPageSearchScopeAuthors ()
{
$page = Base::PAGE_OPENSEARCH_QUERY;


Loading…
Cancel
Save