Browse Source

Add a new test with an accentuated character

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

+ 19
- 0
test/pageTest.php View File

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

public function testPageSearch_WithAccentuatedCharacters ()
{
global $config;
$page = Base::PAGE_OPENSEARCH_QUERY;
$query = "curée";
$qid = NULL;
$n = "1";

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

$this->assertEquals ("Search result for *curée*", $currentPage->title);
$this->assertCount (1, $currentPage->entryArray);
$this->assertEquals ("Search result for *curée* 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