MediaWiki  master
ApiOptionsTest Class Reference

API Database medium. More...

Inheritance diagram for ApiOptionsTest:
Collaboration diagram for ApiOptionsTest:

Public Member Functions

 getOptionKinds (IContextSource $context, $options=null)
 
 hookGetPreferences ( $user, &$preferences)
 
 provideOptionManupulation ()
 
 testAnon ()
 
 testNoChanges ()
 
 testNoOptionname ()
 
 testNoToken ()
 ApiUsageException. More...
 
 testOptionManupulation (array $params, array $setOptions, array $result=null, $message='')
 provideOptionManupulation More...
 
 testReset ()
 
 testResetChangeOption ()
 
 testResetKinds ()
 

Protected Member Functions

 setUp ()
 
- Protected Member Functions inherited from MediaWikiLangTestCase
 setUp ()
 

Private Member Functions

 executeQuery ( $request)
 
 getSampleRequest ( $custom=[])
 

Private Attributes

DerivativeContext $mContext
 
 $mSession
 
ApiOptions $mTested
 
PHPUnit_Framework_MockObject_MockObject $mUserMock
 

Static Private Attributes

static $Success = [ 'options' => 'success' ]
 

Detailed Description

API Database medium.

ApiOptions

Definition at line 10 of file ApiOptionsTest.php.

Member Function Documentation

◆ executeQuery()

ApiOptionsTest::executeQuery (   $request)
private

◆ getOptionKinds()

ApiOptionsTest::getOptionKinds ( IContextSource  $context,
  $options = null 
)
Parameters
IContextSource$context
array | null$options
Returns
array

Definition at line 111 of file ApiOptionsTest.php.

References $options, $value, as, and null.

◆ getSampleRequest()

ApiOptionsTest::getSampleRequest (   $custom = [])
private

◆ hookGetPreferences()

ApiOptionsTest::hookGetPreferences (   $user,
$preferences 
)

Definition at line 71 of file ApiOptionsTest.php.

References as.

◆ provideOptionManupulation()

ApiOptionsTest::provideOptionManupulation ( )

Definition at line 315 of file ApiOptionsTest.php.

References false, null, and true.

◆ setUp()

ApiOptionsTest::setUp ( )
protected

Definition at line 22 of file ApiOptionsTest.php.

References class, Language\factory(), and Title\newFromText().

◆ testAnon()

ApiOptionsTest::testAnon ( )

◆ testNoChanges()

ApiOptionsTest::testNoChanges ( )

◆ testNoOptionname()

ApiOptionsTest::testNoOptionname ( )

◆ testNoToken()

ApiOptionsTest::testNoToken ( )

ApiUsageException.

Definition at line 165 of file ApiOptionsTest.php.

References $request, executeQuery(), getSampleRequest(), and null.

◆ testOptionManupulation()

ApiOptionsTest::testOptionManupulation ( array  $params,
array  $setOptions,
array  $result = null,
  $message = '' 
)

provideOptionManupulation

Parameters
array$params
array$setOptions
array | null$result

Definition at line 288 of file ApiOptionsTest.php.

References $request, $response, executeQuery(), and getSampleRequest().

◆ testReset()

ApiOptionsTest::testReset ( )

Definition at line 220 of file ApiOptionsTest.php.

References $request, $response, executeQuery(), and getSampleRequest().

◆ testResetChangeOption()

ApiOptionsTest::testResetChangeOption ( )

Definition at line 256 of file ApiOptionsTest.php.

References $args, $response, executeQuery(), and getSampleRequest().

◆ testResetKinds()

ApiOptionsTest::testResetKinds ( )

Definition at line 238 of file ApiOptionsTest.php.

References $request, $response, executeQuery(), and getSampleRequest().

Member Data Documentation

◆ $mContext

DerivativeContext ApiOptionsTest::$mContext
private

Definition at line 18 of file ApiOptionsTest.php.

◆ $mSession

ApiOptionsTest::$mSession
private

Definition at line 16 of file ApiOptionsTest.php.

◆ $mTested

ApiOptions ApiOptionsTest::$mTested
private

Definition at line 15 of file ApiOptionsTest.php.

◆ $mUserMock

PHPUnit_Framework_MockObject_MockObject ApiOptionsTest::$mUserMock
private

Definition at line 13 of file ApiOptionsTest.php.

◆ $Success

ApiOptionsTest::$Success = [ 'options' => 'success' ]
staticprivate

Definition at line 20 of file ApiOptionsTest.php.


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