MediaWiki
REL1_21
|
Upload More...
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) |
Upload
Definition at line 5 of file UploadTest.php.
UploadTest::createFileOfSize | ( | $ | size | ) | [private] |
Definition at line 96 of file UploadTest.php.
References $size, and wfTempDir().
Referenced by testMaxUploadSize().
static UploadTest::provideTestTitleValidation | ( | ) | [static] |
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.
UploadTest::tearDown | ( | ) | [protected] |
Reimplemented from MediaWikiTestCase.
Definition at line 20 of file UploadTest.php.
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.
UploadTest::$upload [protected] |
Definition at line 6 of file UploadTest.php.