MediaWiki  REL1_21
UploadTest Class Reference

Upload More...

Inheritance diagram for UploadTest:
Collaboration diagram for UploadTest:

List of all members.

Public Member Functions

 testMaxUploadSize ()
 test uploading a 100 bytes file with $wgMaxUploadSize = 100
 testTitleValidation ($srcFilename, $dstFilename, $code, $msg)
 First checks the return code of UploadBase::getTitle() and then the actual returned title.
 testVerifyUpload ()
 Test the upload verification functions.

Static Public Member Functions

static provideTestTitleValidation ()
 Test various forms of valid and invalid titles that can be supplied.

Protected Member Functions

 setUp ()
 setUp and tearDown should (where significant) happen in reverse order.
 tearDown ()

Protected Attributes

 $upload

Private Member Functions

 createFileOfSize ($size)

Detailed Description

Upload

Definition at line 5 of file UploadTest.php.


Member Function Documentation

UploadTest::createFileOfSize ( size) [private]

Definition at line 96 of file UploadTest.php.

References $size, and wfTempDir().

Referenced by testMaxUploadSize().

Test various forms of valid and invalid titles that can be supplied.

Definition at line 51 of file UploadTest.php.

References array(), UploadBase\FILENAME_TOO_LONG, UploadBase\FILETYPE_MISSING, UploadBase\ILLEGAL_FILENAME, UploadBase\MIN_LENGTH_PARTNAME, and UploadBase\OK.

UploadTest::setUp ( ) [protected]

setUp and tearDown should (where significant) happen in reverse order.

Reimplemented from MediaWikiTestCase.

Definition at line 9 of file UploadTest.php.

References $wgHooks, global, and hooks.

UploadTest::tearDown ( ) [protected]

Reimplemented from MediaWikiTestCase.

Definition at line 20 of file UploadTest.php.

References $wgHooks, global, and hooks.

test uploading a 100 bytes file with $wgMaxUploadSize = 100

This method should be abstracted so we can test different settings.

Definition at line 112 of file UploadTest.php.

References $result, $wgFileExtensions, array(), createFileOfSize(), global, and UploadBase\OK.

UploadTest::testTitleValidation ( srcFilename,
dstFilename,
code,
msg 
)

First checks the return code of UploadBase::getTitle() and then the actual returned title.

provideTestTitleValidation

Definition at line 34 of file UploadTest.php.

References UploadBase\OK.

Test the upload verification functions.

Definition at line 86 of file UploadTest.php.

References $result, and UploadBase\EMPTY_FILE.


Member Data Documentation

UploadTest::$upload [protected]

Definition at line 6 of file UploadTest.php.


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