MediaWiki  REL1_22
SpecialSearchTest Class Reference

Test class for SpecialSearch class Copyright © 2012, Antoine Musso. More...

Inheritance diagram for SpecialSearchTest:
Collaboration diagram for SpecialSearchTest:

List of all members.

Public Member Functions

 newUserWithSearchNS ($opt=null)
 Helper to create a new User object with given options User remains anonymous though.
 testProfileAndNamespaceLoading ($requested, $userOptions, $expectedProfile, $expectedNS, $message= 'Profile name and namespaces mismatches!')
 SpecialSearch::load provideSearchOptionsTests
 testSearchTermIsNotExpanded ()
 Verify we do not expand search term in <title> on search result page https://gerrit.wikimedia.org/r/4841.

Static Public Member Functions

static provideSearchOptionsTests ()

Private Attributes

 $search

Detailed Description

Test class for SpecialSearch class Copyright © 2012, Antoine Musso.

Author:
Antoine Musso Database

Definition at line 10 of file SpecialSearchTest.php.


Member Function Documentation

Helper to create a new User object with given options User remains anonymous though.

Definition at line 99 of file SpecialSearchTest.php.

References $name, $value, as, and User\newFromId().

Referenced by testProfileAndNamespaceLoading().

Definition at line 58 of file SpecialSearchTest.php.

References array(), and SearchEngine\defaultNamespaces().

SpecialSearchTest::testProfileAndNamespaceLoading ( requested,
userOptions,
expectedProfile,
expectedNS,
message = 'Profile name and namespaces mismatches!' 
)

SpecialSearch::load provideSearchOptionsTests

Parameters:
$requestedArray Request parameters. For example array( 'ns5' => true, 'ns6' => true). NULL to use default options.
$userOptionsArray User options to test with. For example array('searchNs5' => 1 );. NULL to use default options.
$expectedProfileAn expected search profile name
$expectedNsArray Expected namespaces

Definition at line 21 of file SpecialSearchTest.php.

References $search, array(), newUserWithSearchNS(), and RequestContext\setUser().

Verify we do not expand search term in <title> on search result page https://gerrit.wikimedia.org/r/4841.

Definition at line 115 of file SpecialSearchTest.php.

References $search, $term, and Title\newFromText().


Member Data Documentation

SpecialSearchTest::$search [private]

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