MediaWiki  REL1_24
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 ()

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.

Parameters:
array | null$opt

Definition at line 101 of file SpecialSearchTest.php.

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

Referenced by testProfileAndNamespaceLoading().

Definition at line 59 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:
array$requestedRequest parameters. For example: array( 'ns5' => true, 'ns6' => true). Null to use default options.
array$userOptionsUser options to test with. For example: array('searchNs5' => 1 );. Null to use default options.
string$expectedProfileAn expected search profile name
array$expectedNSExpected namespaces
string$message

Definition at line 23 of file SpecialSearchTest.php.

References 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 117 of file SpecialSearchTest.php.

References $term, array(), Title\newFromText(), and MediaWikiTestCase\setMwGlobals().


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