From f5dec1eefaf593fb424178ce6f4d9a979c862ee0 Mon Sep 17 00:00:00 2001 From: Platonides Date: Tue, 21 Jun 2011 15:06:59 +0000 Subject: [PATCH] Revert r90483, if tesla has problems, it should get proper permissions to the affected folders (or change the test to use a temp folder) The test was not consistent, since first time it would use the svn file, which renames it... and on next run it would be missing! I added the '.' to the unlik() step so it properly cleans up. Opened bug 29512 for the strange UploadStash behavior. However, although it passes now most of the times, it sometimes fails with the strange exception: Only variables should be passed by reference phase3/includes/upload/UploadStash.php:143 phase3/tests/phpunit/includes/upload/UploadStashTest.php:22 phase3/tests/phpunit/MediaWikiTestCase.php:64 phase3/tests/phpunit/MediaWikiPHPUnitCommand.php:20 phase3/tests/phpunit/phpunit.php:60 --- tests/phpunit/includes/upload/UploadStashTest.php | 7 +++++-- tests/phpunit/includes/upload/bug29408 | Bin 1 -> 0 bytes 2 files changed, 5 insertions(+), 2 deletions(-) delete mode 100644 tests/phpunit/includes/upload/bug29408 diff --git a/tests/phpunit/includes/upload/UploadStashTest.php b/tests/phpunit/includes/upload/UploadStashTest.php index aabe7501d8..3f7863dced 100644 --- a/tests/phpunit/includes/upload/UploadStashTest.php +++ b/tests/phpunit/includes/upload/UploadStashTest.php @@ -11,7 +11,7 @@ class UploadStashTest extends MediaWikiTestCase { // Setup a file for bug 29408 $this->bug29408File = dirname( __FILE__ ) . '/bug29408'; - // file_put_contents( $this->bug29408File, "\x00" ); + file_put_contents( $this->bug29408File, "\x00" ); } public function testBug29408() { @@ -28,5 +28,8 @@ class UploadStashTest extends MediaWikiTestCase { public function tearDown() { parent::tearDown(); + + unlink( $this->bug29408File . "." ); + } -} \ No newline at end of file +} diff --git a/tests/phpunit/includes/upload/bug29408 b/tests/phpunit/includes/upload/bug29408 deleted file mode 100644 index f76dd238ade08917e6712764a16a22005a50573d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1 IcmZPo000310RR91 -- 2.20.1