MediaWiki  1.23.8
ApiTestContext Class Reference
Inheritance diagram for ApiTestContext:
Collaboration diagram for ApiTestContext:

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 ()
 Get the Config object. More...
 
 getLang ()
 
 getLanguage ()
 Get the Language object. More...
 
 getOutput ()
 Get the OutputPage object. More...
 
 getRequest ()
 Get the WebRequest object. More...
 
 getSkin ()
 Get the Skin object. More...
 
 getTitle ()
 Get the Title object. More...
 
 getUser ()
 Get the User object. More...
 
 getWikiPage ()
 Get the WikiPage object. More...
 
 msg ()
 Helpful methods. More...
 
 setConfig (Config $c)
 Set the Config object. More...
 
 setLang ( $l)
 Set the Language object. More...
 
 setLanguage ( $l)
 Set the Language object. More...
 
 setOutput (OutputPage $o)
 
 setRequest (WebRequest $r)
 Set the WebRequest object. More...
 
 setSkin (Skin $s)
 Set the Skin object. More...
 
 setTitle ( $t)
 Set the Title object. More...
 
 setUser (User $u)
 Set the User object. More...
 
 setWikiPage (WikiPage $p)
 Set the WikiPage object. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from RequestContext
static getMain ()
 Static methods. More...
 
static importScopedSession (array $params)
 Import the resolved user IP, HTTP headers, user ID, and session ID. More...
 
static newExtraneousContext (Title $title, $request=array())
 Create a new extraneous context. More...
 
static sanitizeLangCode ( $code)
 Accepts a language code and ensures it's sane. More...
 

Detailed Description

Definition at line 3 of file ApiTestContext.php.

Member Function Documentation

◆ newTestContext()

ApiTestContext::newTestContext ( WebRequest  $request,
User  $user = null 
)

Returns a DerivativeContext with the request variables in place.

Parameters
$requestWebRequest request object including parameters and session
$userUser or null
Returns
DerivativeContext

Definition at line 12 of file ApiTestContext.php.

References RequestContext\$request, and RequestContext\$user.


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