MediaWiki
REL1_22
|
Test class for SpecialSearch class Copyright © 2012, Antoine Musso. More...
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 |
Test class for SpecialSearch class Copyright © 2012, Antoine Musso.
Definition at line 10 of file SpecialSearchTest.php.
SpecialSearchTest::newUserWithSearchNS | ( | $ | opt = null | ) |
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().
static SpecialSearchTest::provideSearchOptionsTests | ( | ) | [static] |
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
$requested | Array Request parameters. For example array( 'ns5' => true, 'ns6' => true). NULL to use default options. |
$userOptions | Array User options to test with. For example array('searchNs5' => 1 );. NULL to use default options. |
$expectedProfile | An expected search profile name |
$expectedNs | Array 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().
SpecialSearchTest::$search [private] |
Definition at line 11 of file SpecialSearchTest.php.
Referenced by testProfileAndNamespaceLoading(), and testSearchTermIsNotExpanded().