MediaWiki
1.32.5
|
Public Member Functions | |
newTestContext (WebRequest $request, User $user=null) | |
Returns a DerivativeContext with the request variables in place. More... | |
Public Member Functions inherited from RequestContext | |
canUseWikiPage () | |
Check whether a WikiPage object can be get with getWikiPage(). More... | |
exportSession () | |
Export the resolved user IP, HTTP headers, user ID, and session ID. More... | |
getConfig () | |
getLanguage () | |
Get the Language object. More... | |
getOutput () | |
getRequest () | |
getSkin () | |
getStats () | |
getTiming () | |
getTitle () | |
getUser () | |
getWikiPage () | |
Get the WikiPage object. More... | |
hasTitle () | |
Check, if a Title object is set. More... | |
msg ( $key) | |
Get a Message object with context set Parameters are the same as wfMessage() More... | |
setConfig (Config $config) | |
setLanguage ( $language) | |
setOutput (OutputPage $output) | |
setRequest (WebRequest $request) | |
setSkin (Skin $skin) | |
setTitle (Title $title=null) | |
setUser (User $user) | |
setWikiPage (WikiPage $wikiPage) | |
Additional Inherited Members | |
Static Public Member Functions inherited from RequestContext | |
static | getMain () |
Get the RequestContext object associated with the main request. More... | |
static | getMainAndWarn ( $func=__METHOD__) |
Get the RequestContext object associated with the main request and gives a warning to the log, to find places, where a context maybe is missing. More... | |
static | importScopedSession (array $params) |
Import an client IP address, HTTP headers, user ID, and session ID. More... | |
static | newExtraneousContext (Title $title, $request=[]) |
Create a new extraneous context. More... | |
static | resetMain () |
Resets singleton returned by getMain(). More... | |
static | sanitizeLangCode ( $code) |
Accepts a language code and ensures it's sane. More... | |
Definition at line 3 of file ApiTestContext.php.
ApiTestContext::newTestContext | ( | WebRequest | $request, |
User | $user = null |
||
) |
Returns a DerivativeContext with the request variables in place.
WebRequest | $request | WebRequest request object including parameters and session |
User | null | $user | User or null |
Definition at line 12 of file ApiTestContext.php.
References $context, RequestContext\$request, and RequestContext\$user.