MediaWiki
REL1_19
|
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. | |
provideSearchOptionsTests () | |
setUp () | |
tearDown () | |
testProfileAndNamespaceLoading ($requested, $userOptions, $expectedProfile, $expectedNS, $message= 'Profile name and namespaces mismatches!') | |
SpecialSearch::load 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 97 of file SpecialSearchTest.php.
References User\newFromId().
Referenced by testProfileAndNamespaceLoading().
Definition at line 62 of file SpecialSearchTest.php.
References SearchEngine\defaultNamespaces().
Definition at line 13 of file SpecialSearchTest.php.
Definition at line 14 of file SpecialSearchTest.php.
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 24 of file SpecialSearchTest.php.
References $search, newUserWithSearchNS(), and RequestContext\setUser().
SpecialSearchTest::$search [private] |
Definition at line 11 of file SpecialSearchTest.php.
Referenced by testProfileAndNamespaceLoading().