From: Platonides Date: Sat, 12 Feb 2011 14:58:16 +0000 (+0000) Subject: Follow up r81883. Readd the extension. This kind of breaks the tempnam() guarantee... X-Git-Tag: 1.31.0-rc.0~32027 X-Git-Url: http://git.cyclocoop.org/%27.parametre_url%28%20%20%20generer_action_auteur%28%27charger_plugin%27%2C%20%27update_flux%27%29%2C%27update_flux%27%2C%20%27oui%27%29.%27?a=commitdiff_plain;h=585e1b7c619c4e5a7e77cfaa427f180164ceddb9;p=lhc%2Fweb%2Fwiklou.git Follow up r81883. Readd the extension. This kind of breaks the tempnam() guarantee, but otherwise with no extension the uploader returns UploadBase::FILETYPE_MISSING, not UploadBase::SUCCESS. --- diff --git a/tests/phpunit/includes/UploadTest.php b/tests/phpunit/includes/UploadTest.php index be0482cbb6..3ee4eb6783 100644 --- a/tests/phpunit/includes/UploadTest.php +++ b/tests/phpunit/includes/UploadTest.php @@ -77,7 +77,7 @@ class UploadTest extends MediaWikiTestCase { // Helper used to create an empty file of size $size. private function createFileOfSize( $size ) { - $filename = tempnam( wfTempDir(), "mwuploadtest" ); + $filename = tempnam( wfTempDir(), "mwuploadtest" ) . ".txt"; $fh = fopen( $filename, 'w' ); ftruncate( $fh, $size );