r94728 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r94727‎ | r94728 | r94729 >
Date:04:05, 17 August 2011
Author:bawolff
Status:ok
Tags:
Comment:
follow-up r94601 - add unit tests for stripping the File: prefix from upload, and test handling illegal characters in upload title (thing that caused the issue in r94601)


(I have no idea if things like this (unit-tests) should be tagged 1.18, I assume no but am unsure)
Modified paths:
  • /trunk/phase3/tests/phpunit/includes/upload/UploadTest.php (modified) (history)

Diff [purge]

Index: trunk/phase3/tests/phpunit/includes/upload/UploadTest.php
@@ -41,6 +41,16 @@
4242 'A-B.jpg', UploadBase::OK,
4343 'upload title with colon' );
4444
 45+ /* Stripping leading File: prefix */
 46+ $this->assertUploadTitleAndCode( 'File:C.jpg',
 47+ 'C.jpg', UploadBase::OK,
 48+ 'upload title with File prefix' );
 49+
 50+ /* Test illegal suggested title (r94601) */
 51+ $this->assertUploadTitleAndCode( '%281%29.JPG',
 52+ null, UploadBase::ILLEGAL_FILENAME,
 53+ 'illegal title for upload' );
 54+
4555 /* A title without extension */
4656 $this->assertUploadTitleAndCode( 'A',
4757 null, UploadBase::FILETYPE_MISSING,

Follow-up revisions

RevisionCommit summaryAuthorDate
r95607MFT to REL1_18...hashar19:28, 27 August 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r94601follow-up r88171 - fix fatal if suggested filename has illegal character in it....bawolff05:37, 16 August 2011

Status & tagging log