MediaWiki  REL1_22
ApiQueryContinueTestBase Class Reference
Inheritance diagram for ApiQueryContinueTestBase:
Collaboration diagram for ApiQueryContinueTestBase:

List of all members.

Protected Member Functions

 checkC ($expected, $params, $expectedCount, $id, $continue=true)
 Run query() and compare against expected values.
 mergeResult (&$results, $newResult, $numericIds=false)
 Recursively merge the new result returned from the query to the previous results.
 query ($params, $expectedCount, $id, $useContinue=true)
 Run query in a loop until no more values are available.

Protected Attributes

 $mVerbose = false
 Enable to print in-depth debugging info during the test run.

Private Member Functions

 printResult ($data)

Static Private Member Functions

static GetItems ($q, $moduleName, $name, &$print)

Detailed Description

Definition at line 29 of file ApiQueryContinueTestBase.php.


Member Function Documentation

static ApiQueryContinueTestBase::GetItems ( q,
moduleName,
name,
&$  print 
) [static, private]

Definition at line 151 of file ApiQueryContinueTestBase.php.

Referenced by printResult().

ApiQueryContinueTestBase::mergeResult ( &$  results,
newResult,
numericIds = false 
) [protected]

Recursively merge the new result returned from the query to the previous results.

Parameters:
mixed$results
mixed$newResult
bool$numericIdsIf true, treat keys as ids to be merged instead of appending

Definition at line 167 of file ApiQueryContinueTestBase.php.

References $key, $sort, $value, and as.

Referenced by query().

Definition at line 115 of file ApiQueryContinueTestBase.php.

References array(), as, GetItems(), and print.

Referenced by query().

ApiQueryContinueTestBase::query ( params,
expectedCount,
id,
useContinue = true 
) [protected]

Run query in a loop until no more values are available.

Parameters:
array$paramsapi parameters
int$expectedCountmax number of iterations
string$idunit test id
boolean$useContinuetrue to use smart continue
Returns:
mixed: merged results data array
Exceptions:
Exception

Definition at line 53 of file ApiQueryContinueTestBase.php.

References $count, $params, $result, array(), ApiTestCase\doApiRequest(), empty, fail, mergeResult(), print, and printResult().

Referenced by checkC(), ApiQueryContinueTest\test1List(), ApiQueryContinueTest\test2Lists(), ApiQueryContinue2Test\testA(), ApiQueryContinueTest\testGen1Prop(), ApiQueryContinueTest\testGen1Prop1List(), ApiQueryContinueTest\testGen2Prop(), ApiQueryContinueTest\testGen2Prop2List1Meta(), ApiQueryContinueTest\testSameGenAndProp(), and ApiQueryContinueTest\testSameGenList().


Member Data Documentation

ApiQueryContinueTestBase::$mVerbose = false [protected]

Enable to print in-depth debugging info during the test run.

Definition at line 34 of file ApiQueryContinueTestBase.php.


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