r108310 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r108309‎ | r108310 | r108311 >
Date:09:26, 7 January 2012
Author:aaron
Status:ok
Tags:
Comment:
r108300: updated parserTest.inc tests and re-enabled testBug29408()
Modified paths:
  • /trunk/phase3/tests/parser/parserTest.inc (modified) (history)
  • /trunk/phase3/tests/phpunit/includes/upload/UploadStashTest.php (modified) (history)

Diff [purge]

Index: trunk/phase3/tests/phpunit/includes/upload/UploadStashTest.php
@@ -10,11 +10,11 @@
1111
1212 public function setUp() {
1313 parent::setUp();
14 -
 14+
1515 // Setup a file for bug 29408
1616 $this->bug29408File = dirname( __FILE__ ) . '/bug29408';
17 - file_put_contents( $this->bug29408File, "\x00" );
18 -
 17+ file_put_contents( $this->bug29408File, "\x00" );
 18+
1919 self::$users = array(
2020 'sysop' => new ApiTestUser(
2121 'Uploadstashtestsysop',
@@ -30,21 +30,19 @@
3131 )
3232 );
3333 }
34 -
 34+
3535 public function testBug29408() {
3636 global $wgUser;
3737 $wgUser = self::$users['uploader']->user;
38 -
 38+
3939 $repo = RepoGroup::singleton()->getLocalRepo();
4040 $stash = new UploadStash( $repo );
4141
42 - $this->markTestIncomplete( 'Broken' );
43 -
4442 // Throws exception caught by PHPUnit on failure
4543 $file = $stash->stashFile( $this->bug29408File );
4644 // We'll never reach this point if we hit bug 29408
4745 $this->assertTrue( true, 'Unrecognized file without extension' );
48 -
 46+
4947 $stash->removeFile( $file->getFileKey() );
5048 }
5149
@@ -65,11 +63,9 @@
6664 $this->assertTrue( UploadFromStash::isValidRequest($request), 'Check key precedence' );
6765 }
6866
69 -
70 -
7167 public function tearDown() {
7268 parent::tearDown();
73 -
 69+
7470 if( file_exists( $this->bug29408File . "." ) ) {
7571 unlink( $this->bug29408File . "." );
7672 }
Index: trunk/phase3/tests/parser/parserTest.inc
@@ -159,10 +159,10 @@
160160 'name' => 'local-backend',
161161 'lockManager' => 'fsLockManager',
162162 'containerPaths' => array(
163 - 'media-public' => wfTempDir() . '/test-repo/public',
164 - 'media-thumb' => wfTempDir() . '/test-repo/thumb',
165 - 'media-temp' => wfTempDir() . '/test-repo/temp',
166 - 'media-deleted' => wfTempDir() . '/test-repo/delete',
 163+ 'local-public' => wfTempDir() . '/test-repo/public',
 164+ 'local-thumb' => wfTempDir() . '/test-repo/thumb',
 165+ 'local-temp' => wfTempDir() . '/test-repo/temp',
 166+ 'local-deleted' => wfTempDir() . '/test-repo/deleted',
167167 )
168168 ) )
169169 );
@@ -637,10 +637,10 @@
638638 'name' => 'local-backend',
639639 'lockManager' => 'fsLockManager',
640640 'containerPaths' => array(
641 - 'media-public' => $this->uploadDir,
642 - 'media-thumb' => $this->uploadDir . '/thumb',
643 - 'media-temp' => $this->uploadDir . '/temp',
644 - 'media-deleted' => $this->uploadDir . '/delete',
 641+ 'local-public' => $this->uploadDir,
 642+ 'local-thumb' => $this->uploadDir . '/thumb',
 643+ 'local-temp' => $this->uploadDir . '/temp',
 644+ 'local-deleted' => $this->uploadDir . '/delete',
645645 )
646646 ) )
647647 ),

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r108300In FileBackend/FileOp:...aaron01:33, 7 January 2012

Status & tagging log