MediaWiki  REL1_24
UploadFromUrlTest Class Reference

Broken Upload Database More...

Inheritance diagram for UploadFromUrlTest:
Collaboration diagram for UploadFromUrlTest:

List of all members.

Public Member Functions

 testAsyncUpload ($data)
 testClearQueue
 testAsyncUploadWarning ($data)
 testClearQueue
 testClearQueue ()
 Ensure that the job queue is empty before continuing.
 testLeaveMessage ()
 testSetupUrlDownload ($data)
 testClearQueue
 testSyncDownload ($data)
 testClearQueue

Protected Member Functions

 deleteFile ($name)
 doApiRequest (array $params, array $unused=null, $appendModule=false, User $user=null)
 Does the API request and returns the result.
 setUp ()

Private Member Functions

 doAsyncUpload ($token, $ignoreWarnings=false, $leaveMessage=false)
 Helper function to perform an async upload, execute the job and fetch the status.

Detailed Description

Broken Upload Database

UploadFromUrl

Definition at line 10 of file UploadFromUrlTest.php.


Member Function Documentation

UploadFromUrlTest::doApiRequest ( array params,
array session = null,
appendModule = false,
User user = null 
) [protected]

Does the API request and returns the result.

The returned value is an array containing

  • the result data (array)
  • the request (WebRequest)
  • the session data of the request (array)
  • if $appendModule is true, the Api module $module
Parameters:
array$params
array | null$session
bool$appendModule
User | null$user
Returns:
array

Reimplemented from ApiTestCase.

Definition at line 26 of file UploadFromUrlTest.php.

References array(), and wfSetupSession().

Referenced by doAsyncUpload(), testAsyncUploadWarning(), testLeaveMessage(), testSetupUrlDownload(), and testSyncDownload().

UploadFromUrlTest::doAsyncUpload ( token,
ignoreWarnings = false,
leaveMessage = false 
) [private]

Helper function to perform an async upload, execute the job and fetch the status.

Parameters:
string$token
bool$ignoreWarnings
bool$leaveMessage
Returns:
array The result of action=upload&statuskey=key

Definition at line 278 of file UploadFromUrlTest.php.

References $job, $params, array(), doApiRequest(), and JobQueueGroup\singleton().

Referenced by testAsyncUpload(), and testAsyncUploadWarning().

UploadFromUrlTest::setUp ( ) [protected]

Reimplemented from ApiTestCase.

Definition at line 11 of file UploadFromUrlTest.php.

References array(), deleteFile(), MediaWikiTestCase\setMwGlobals(), wfLocalFile(), and wfSetupSession().

testClearQueue

Definition at line 128 of file UploadFromUrlTest.php.

References deleteFile(), doAsyncUpload(), user, and wfLocalFile().

Ensure that the job queue is empty before continuing.

Definition at line 44 of file UploadFromUrlTest.php.

References $job, and JobQueueGroup\singleton().

testClearQueue

Definition at line 55 of file UploadFromUrlTest.php.

References $e, $job, array(), doApiRequest(), JobQueueGroup\singleton(), and user.

testClearQueue

Definition at line 175 of file UploadFromUrlTest.php.

References $job, array(), deleteFile(), doApiRequest(), JobQueueGroup\singleton(), and user.


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