Open Journal Systems  2.4.3
 All Classes Namespaces Functions Variables Groups Pages
FunctionalLucenePluginSearchTest Class Reference
Inheritance diagram for FunctionalLucenePluginSearchTest:
FunctionalLucenePluginBaseTestCase WebTestCase

Public Member Functions

 testAdvancedSearch ()
 
 testMultilingualSearch ()
 
 testSearchAcrossJournals ()
 
 testSearchSyntax ()
 
 testSimpleSearch ()
 

Additional Inherited Members

- Protected Member Functions inherited from FunctionalLucenePluginBaseTestCase
 simpleSearch ($searchPhrase, $searchField= 'query', $articles=array(), $notArticles=array(), $locale= 'en_US', $journal= 'lucene-test')
 
 simpleSearchAcrossJournals ($searchTerm, $locale= 'en_US')
 
- Protected Member Functions inherited from WebTestCase
 getAffectedTables ()
 
 improveException ($e, $testObject)
 
 logIn ()
 
 setUp ()
 
 tearDown ()
 
 verified ()
 
 verifyAndOpen ($url)
 

Detailed Description

Integration/Functional test for the lucene plug-in and its dependencies.

See Also
LucenePlugin

Definition at line 21 of file FunctionalLucenePluginSearchTest.php.

Member Function Documentation

FunctionalLucenePluginSearchTest::testAdvancedSearch ( )

SCENARIO OUTLINE: Advanced search GIVEN I am on an OJS journal's search page AND the journal contains an article with id {id} and the keyword {keyword} in its {search field} WHEN I enter the word {keyword} into the advanced search input field {search field} AND I click the "Search" button THEN I receive a search result with the article id {id} in the result set.

EXAMPLES:

search field | keyword | id

all fields | Mango | 3 author | Another | 4 title | Lucene Test | 4 full text | chicken feet | 3 suppl. files | Pizza | 3 date from/to | * / today | 4 discipline | dietary research | 4 subject | lunchtime | 4 type | personal | 4 coverage | the 21st century | 4

Definition at line 119 of file FunctionalLucenePluginSearchTest.php.

References WebTestCase\improveException(), and WebTestCase\verifyAndOpen().

FunctionalLucenePluginSearchTest::testMultilingualSearch ( )

SCENARIO OUTLINE: Multilingual search GIVEN I am on an OJS journal's home page AND the journal contains an article with the word "chicken" in its "en_US" title AND the same article has the word "Hühnchen" in its "de_DE" title WHEN I enter {search phrase} into the simple search box AND I click the "Search" button THEN I receive a search result with this article in its result set.

EXAMPLES:

search phrase

chicken Hühnchen

Definition at line 267 of file FunctionalLucenePluginSearchTest.php.

References FunctionalLucenePluginBaseTestCase\simpleSearch().

FunctionalLucenePluginSearchTest::testSearchAcrossJournals ( )

SCENARIO: Search across all journals of an installation GIVEN I am on an OJS installation's home page AND the OJS installation contains at least two journals AND at least two journals contain an article with the word "test" in its title WHEN I enter the word "test" into the simple search box AND I click the "Search" button THEN I receive a search result with articles from both journals in the result set.

Definition at line 36 of file FunctionalLucenePluginSearchTest.php.

References FunctionalLucenePluginBaseTestCase\simpleSearchAcrossJournals().

FunctionalLucenePluginSearchTest::testSearchSyntax ( )

SCENARIO OUTLINE: Search syntax GIVEN I am on an OJS journal's home page AND the journal contains an article A with the exact phrase "chicken have wings" in its title AND the journal contains an article B with the words "chicken" and "eggs" in its title AND the journal contains an article C with the words "wings" and "eggs" in its title AND the journal contains an article D with the words "chickenwings" and "eggs" in its title AND I select the "title" search field WHEN I set the current {GUI locale} AND I enter a {search phrase} into the simple search box AND I click the "Search" button THEN I receive a result set that contains {article} but {not article}.

EXAMPLES:

GUI locale | search phrase | article | not article

en_US | chicken wings | A, B, C | D // implicit OR (This deviates from the original requirements, see // http://pkp.sfu.ca/wiki/index.php/OJSdeSearchConcept#Query_Parser.) en_US | chicken AND wings | A | B, C, D // explicit conjunction en_US | chicken OR wings | A, B, C | D // disjunction en_US | chicken NOT wings | B | A, C, D // negation en_US | ((wings OR eggs) NOT chicken) | C, D | A, B // bracketed search phrase en_US | chicken NICHT wings | A, B, C | D // search syntax localization de_DE | chicken NICHT wings | B | A, C, D // - " - en_US | "chicken wings" | | A, B, C, D // phrase search and stopword position increment en_US | "chicken have wings" | A | B, C, D // phrase search en_US | chicken* | A, B, D | C // wildcard search en_US | ChiCkeN Wings | A, B, C | D // case insensitive search

Definition at line 205 of file FunctionalLucenePluginSearchTest.php.

References FunctionalLucenePluginBaseTestCase\simpleSearch().

FunctionalLucenePluginSearchTest::testSimpleSearch ( )

SCENARIO OUTLINE: Simple search GIVEN I am on an OJS journal's home page AND this journal contains an article with id {id} and the keyword {keyword} in its {search field} WHEN I enter the {keyword} into the simple search box AND I select the {search field} to search in AND I click the "Search" button THEN I receive a search result with the article id {id} in the result set.

EXAMPLES:

search field | keyword | id

all fields | Pizza | 3 author | Author | 3 title | Article | 3 abstract | "Article 2 Abstract" | 4 index terms | Food | 3 full text | Nutella | 3

Definition at line 72 of file FunctionalLucenePluginSearchTest.php.

References FunctionalLucenePluginBaseTestCase\simpleSearch().


The documentation for this class was generated from the following file: