MediaWiki  REL1_19
UploadFromUrlTest Class Reference

Broken Upload More...

Inheritance diagram for UploadFromUrlTest:
Collaboration diagram for UploadFromUrlTest:

List of all members.

Public Member Functions

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

Protected Member Functions

 deleteFile ($name)
 doApiRequest ($params, $unused=null, $appendModule=false, $user=null)

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

Definition at line 7 of file UploadFromUrlTest.php.


Member Function Documentation

UploadFromUrlTest::deleteFile ( name) [protected]

Definition at line 336 of file UploadFromUrlTest.php.

References $file, $t, FileDeleteForm\doDelete(), Title\newFromText(), and wfFindFile().

Referenced by setUp(), testAsyncUpload(), testAsyncUploadWarning(), testLeaveMessage(), and testSyncDownload().

Here is the call graph for this function:

Here is the caller graph for this function:

UploadFromUrlTest::doApiRequest ( params,
unused = null,
appendModule = false,
user = null 
) [protected]

Reimplemented from ApiTestCase.

Definition at line 23 of file UploadFromUrlTest.php.

References wfSetupSession().

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

Here is the call graph for this function:

Here is the caller graph for this function:

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

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

Returns:
array The result of action=upload&statuskey=key

Definition at line 297 of file UploadFromUrlTest.php.

References $job, doApiRequest(), and Job\pop().

Referenced by testAsyncUpload(), and testAsyncUploadWarning().

Here is the call graph for this function:

Here is the caller graph for this function:

Reimplemented from ApiTestCase.

Definition at line 9 of file UploadFromUrlTest.php.

References $wgAllowAsyncCopyUploads, $wgAllowCopyUploads, $wgEnableUploads, deleteFile(), wfLocalFile(), and wfSetupSession().

Here is the call graph for this function:

testLogin testClearQueue

Definition at line 152 of file UploadFromUrlTest.php.

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

Here is the call graph for this function:

testLogin testClearQueue

Definition at line 171 of file UploadFromUrlTest.php.

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

Here is the call graph for this function:

Ensure that the job queue is empty before continuing.

Definition at line 38 of file UploadFromUrlTest.php.

References $job, and Job\pop().

Here is the call graph for this function:

Definition at line 226 of file UploadFromUrlTest.php.

References $job, deleteFile(), doApiRequest(), Title\GAID_FOR_UPDATE, Revision\newFromTitle(), Job\pop(), and wfLocalFile().

Here is the call graph for this function:

Todo:
Document why we test login, since the $wgUser hack used doesn't require login

Definition at line 50 of file UploadFromUrlTest.php.

References doApiRequest().

Here is the call graph for this function:

testLogin testClearQueue

Definition at line 78 of file UploadFromUrlTest.php.

References $job, doApiRequest(), and Job\pop().

Here is the call graph for this function:

testLogin testClearQueue

Definition at line 202 of file UploadFromUrlTest.php.

References $job, deleteFile(), doApiRequest(), and Job\pop().

Here is the call graph for this function:


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