MediaWiki
1.23.2
|
@group API @group Database @group medium More...
Public Member Functions | |
getOptionKinds (IContextSource $context, $options=null) | |
hookGetPreferences ( $user, &$preferences) | |
testAnon () | |
testChange () | |
testMultiSelect () | |
testNoChanges () | |
testNoOptionname () | |
testNoToken () | |
@expectedException UsageException More... | |
testOptionResetValue () | |
testOptionWithValue () | |
testReset () | |
testResetChangeOption () | |
testResetKinds () | |
testSpecialOption () | |
testUnknownOption () | |
testUserjsOption () | |
Public Member Functions inherited from MediaWikiTestCase | |
__call ( $func, $args) | |
__construct ( $name=null, array $data=array(), $dataName='') | |
addDBData () | |
Stub. More... | |
dbPrefix () | |
getCliArg ( $offset) | |
hideDeprecated ( $function) | |
Don't throw a warning if $function is deprecated and called later. More... | |
needsDB () | |
run (PHPUnit_Framework_TestResult $result=null) | |
setCliArg ( $offset, $value) | |
testMediaWikiTestCaseParentSetupCalled () | |
Make sure MediaWikiTestCase extending classes have called their parent setUp method. More... | |
usesTemporaryTables () | |
Protected Member Functions | |
setUp () | |
tearDown () | |
Protected Member Functions inherited from MediaWikiTestCase | |
arrayWrap (array $elements) | |
Utility method taking an array of elements and wrapping each element in it's own array. More... | |
assertArrayEquals (array $expected, array $actual, $ordered=false, $named=false) | |
Assert that two arrays are equal. More... | |
assertException ( $code, $expected='Exception', $message='') | |
Asserts that an exception of the specified type occurs when running the provided code. More... | |
assertHTMLEquals ( $expected, $actual, $msg='') | |
Put each HTML element on its own line and then equals() the results. More... | |
assertSelect ( $table, $fields, $condition, array $expectedRows) | |
Asserts that the given database query yields the rows given by $expectedRows. More... | |
assertType ( $type, $actual, $message='') | |
Asserts the type of the provided value. More... | |
assertTypeOrValue ( $type, $actual, $value=false, $message='') | |
Asserts that the provided variable is of the specified internal type or equals the $value argument. More... | |
assertValidHtmlDocument ( $html) | |
Asserts that the given string is valid HTML document. More... | |
assertValidHtmlSnippet ( $html) | |
Asserts that the given string is a valid HTML snippet. More... | |
checkDbIsSupported () | |
checkHasDiff3 () | |
Check, if $wgDiff3 is set and ready to merge Will mark the calling test as skipped, if not ready. More... | |
checkHasGzip () | |
Check whether we have the 'gzip' commandline utility, will skip the test whenever "gzip -V" fails. More... | |
checkPHPExtension ( $extName) | |
Check if $extName is a loaded PHP extension, will skip the test whenever it is not loaded. More... | |
getDefaultWikitextNS () | |
Returns the ID of a namespace that defaults to Wikitext. More... | |
getNewTempDirectory () | |
obtains a new temporary directory More... | |
getNewTempFile () | |
Obtains a new temporary file name. More... | |
isWikitextNS ( $ns) | |
Returns true if the given namespace defaults to Wikitext according to $wgNamespaceContentModels. More... | |
mergeMwGlobalArrayValue ( $name, $values) | |
Merges the given values into a MW global array variable. More... | |
objectAssociativeSort (array &$array) | |
Does an associative sort that works for objects. More... | |
setMwGlobals ( $pairs, $value=null) | |
stashMwGlobals ( $globalKeys) | |
Stashes the global, will be restored in tearDown() More... | |
Private Member Functions | |
executeQuery ( $request) | |
getSampleRequest ( $custom=array()) | |
Private Attributes | |
DerivativeContext | $mContext |
$mOldGetPreferencesHooks = false | |
$mSession | |
ApiOptions | $mTested |
PHPUnit_Framework_MockObject_MockObject | $mUserMock |
Static Private Attributes | |
static | $Success = array( 'options' => 'success' ) |
Additional Inherited Members | |
Static Public Member Functions inherited from MediaWikiTestCase | |
static | listTables ( $db) |
static | setupTestDB (DatabaseBase $db, $prefix) |
Creates an empty skeleton of the wiki database by cloning its structure to equivalent tables using the given $prefix. More... | |
static | teardownTestDB () |
Restores MediaWiki to using the table set (table prefix) it was using before setupTestDB() was called. More... | |
Public Attributes inherited from MediaWikiTestCase | |
const | DB_PREFIX = 'unittest_' |
Table name prefixes. More... | |
const | ORA_DB_PREFIX = 'ut_' |
Static Public Attributes inherited from MediaWikiTestCase | |
static | $users |
Static Protected Member Functions inherited from MediaWikiTestCase | |
static | stripStringKeys (&$r) |
Utility function for eliminating all string keys from an array. More... | |
Protected Attributes inherited from MediaWikiTestCase | |
DatabaseBase | $db |
array | $supportedDBs |
array | $tablesUsed = array() |
@group API @group Database @group medium
@covers ApiOptions
Definition at line 10 of file ApiOptionsTest.php.
|
private |
Definition at line 148 of file ApiOptionsTest.php.
Referenced by testAnon(), testChange(), testMultiSelect(), testNoChanges(), testNoOptionname(), testNoToken(), testOptionResetValue(), testOptionWithValue(), testReset(), testResetChangeOption(), testResetKinds(), testSpecialOption(), testUnknownOption(), and testUserjsOption().
ApiOptionsTest::getOptionKinds | ( | IContextSource | $context, |
$options = null |
|||
) |
IContextSource | $context | |
array | null | $options |
Definition at line 105 of file ApiOptionsTest.php.
|
private |
Definition at line 137 of file ApiOptionsTest.php.
References array().
Referenced by testAnon(), testChange(), testMultiSelect(), testNoChanges(), testNoOptionname(), testNoToken(), testOptionResetValue(), testOptionWithValue(), testReset(), testResetChangeOption(), testResetKinds(), testSpecialOption(), testUnknownOption(), and testUserjsOption().
ApiOptionsTest::hookGetPreferences | ( | $user, | |
& | $preferences | ||
) |
Definition at line 69 of file ApiOptionsTest.php.
|
protected |
Reimplemented from MediaWikiLangTestCase.
Definition at line 21 of file ApiOptionsTest.php.
References $wgHooks, array(), global, and Title\newFromText().
|
protected |
Reimplemented from MediaWikiTestCase.
Definition at line 58 of file ApiOptionsTest.php.
References $mOldGetPreferencesHooks, $wgHooks, and global.
ApiOptionsTest::testAnon | ( | ) |
Definition at line 164 of file ApiOptionsTest.php.
References $e, executeQuery(), fail, and getSampleRequest().
ApiOptionsTest::testChange | ( | ) |
Definition at line 290 of file ApiOptionsTest.php.
References $response, array(), executeQuery(), and getSampleRequest().
ApiOptionsTest::testMultiSelect | ( | ) |
Definition at line 358 of file ApiOptionsTest.php.
References $response, array(), executeQuery(), and getSampleRequest().
ApiOptionsTest::testNoChanges | ( | ) |
Definition at line 196 of file ApiOptionsTest.php.
References $e, executeQuery(), fail, and getSampleRequest().
ApiOptionsTest::testNoOptionname | ( | ) |
Definition at line 182 of file ApiOptionsTest.php.
References $e, array(), executeQuery(), fail, and getSampleRequest().
ApiOptionsTest::testNoToken | ( | ) |
@expectedException UsageException
Definition at line 158 of file ApiOptionsTest.php.
References array(), executeQuery(), and getSampleRequest().
ApiOptionsTest::testOptionResetValue | ( | ) |
Definition at line 273 of file ApiOptionsTest.php.
References $response, array(), executeQuery(), and getSampleRequest().
ApiOptionsTest::testOptionWithValue | ( | ) |
Definition at line 255 of file ApiOptionsTest.php.
References $response, array(), executeQuery(), and getSampleRequest().
ApiOptionsTest::testReset | ( | ) |
Definition at line 219 of file ApiOptionsTest.php.
References $response, array(), executeQuery(), and getSampleRequest().
ApiOptionsTest::testResetChangeOption | ( | ) |
Definition at line 325 of file ApiOptionsTest.php.
References $args, $response, array(), executeQuery(), and getSampleRequest().
ApiOptionsTest::testResetKinds | ( | ) |
Definition at line 237 of file ApiOptionsTest.php.
References $response, array(), executeQuery(), and getSampleRequest().
ApiOptionsTest::testSpecialOption | ( | ) |
Definition at line 390 of file ApiOptionsTest.php.
References $response, array(), executeQuery(), and getSampleRequest().
ApiOptionsTest::testUnknownOption | ( | ) |
Definition at line 413 of file ApiOptionsTest.php.
References $response, array(), executeQuery(), and getSampleRequest().
ApiOptionsTest::testUserjsOption | ( | ) |
Definition at line 436 of file ApiOptionsTest.php.
References $response, array(), executeQuery(), and getSampleRequest().
|
private |
Definition at line 15 of file ApiOptionsTest.php.
|
private |
Definition at line 17 of file ApiOptionsTest.php.
Referenced by tearDown().
|
private |
Definition at line 14 of file ApiOptionsTest.php.
|
private |
Definition at line 13 of file ApiOptionsTest.php.
|
private |
Definition at line 12 of file ApiOptionsTest.php.
Definition at line 19 of file ApiOptionsTest.php.