https://www.mediawiki.org/wiki/Special:Code/MediaWiki/108310
Revision: 108310
Author: aaron
Date: 2012-01-07 09:26:11 +0000 (Sat, 07 Jan 2012)
Log Message:
-----------
r108300: updated parserTest.inc tests and re-enabled testBug29408()
Modified Paths:
--------------
trunk/phase3/tests/parser/parserTest.inc
trunk/phase3/tests/phpunit/includes/upload/UploadStashTest.php
Modified: trunk/phase3/tests/parser/parserTest.inc
===================================================================
--- trunk/phase3/tests/parser/parserTest.inc 2012-01-07 09:08:29 UTC (rev
108309)
+++ trunk/phase3/tests/parser/parserTest.inc 2012-01-07 09:26:11 UTC (rev
108310)
@@ -159,10 +159,10 @@
'name' => 'local-backend',
'lockManager' => 'fsLockManager',
'containerPaths' => array(
- 'media-public' => wfTempDir() .
'/test-repo/public',
- 'media-thumb' => wfTempDir() .
'/test-repo/thumb',
- 'media-temp' => wfTempDir() .
'/test-repo/temp',
- 'media-deleted' => wfTempDir() .
'/test-repo/delete',
+ 'local-public' => wfTempDir() .
'/test-repo/public',
+ 'local-thumb' => wfTempDir() .
'/test-repo/thumb',
+ 'local-temp' => wfTempDir() .
'/test-repo/temp',
+ 'local-deleted' => wfTempDir() .
'/test-repo/deleted',
)
) )
);
@@ -637,10 +637,10 @@
'name' => 'local-backend',
'lockManager' => 'fsLockManager',
'containerPaths' => array(
- 'media-public' =>
$this->uploadDir,
- 'media-thumb' =>
$this->uploadDir . '/thumb',
- 'media-temp' =>
$this->uploadDir . '/temp',
- 'media-deleted' =>
$this->uploadDir . '/delete',
+ 'local-public' =>
$this->uploadDir,
+ 'local-thumb' =>
$this->uploadDir . '/thumb',
+ 'local-temp' =>
$this->uploadDir . '/temp',
+ 'local-deleted' =>
$this->uploadDir . '/delete',
)
) )
),
Modified: trunk/phase3/tests/phpunit/includes/upload/UploadStashTest.php
===================================================================
--- trunk/phase3/tests/phpunit/includes/upload/UploadStashTest.php
2012-01-07 09:08:29 UTC (rev 108309)
+++ trunk/phase3/tests/phpunit/includes/upload/UploadStashTest.php
2012-01-07 09:26:11 UTC (rev 108310)
@@ -10,11 +10,11 @@
public function setUp() {
parent::setUp();
-
+
// Setup a file for bug 29408
$this->bug29408File = dirname( __FILE__ ) . '/bug29408';
- file_put_contents( $this->bug29408File, "\x00" );
-
+ file_put_contents( $this->bug29408File, "\x00" );
+
self::$users = array(
'sysop' => new ApiTestUser(
'Uploadstashtestsysop',
@@ -30,21 +30,19 @@
)
);
}
-
+
public function testBug29408() {
global $wgUser;
$wgUser = self::$users['uploader']->user;
-
+
$repo = RepoGroup::singleton()->getLocalRepo();
$stash = new UploadStash( $repo );
- $this->markTestIncomplete( 'Broken' );
-
// Throws exception caught by PHPUnit on failure
$file = $stash->stashFile( $this->bug29408File );
// We'll never reach this point if we hit bug 29408
$this->assertTrue( true, 'Unrecognized file without extension'
);
-
+
$stash->removeFile( $file->getFileKey() );
}
@@ -65,11 +63,9 @@
$this->assertTrue( UploadFromStash::isValidRequest($request),
'Check key precedence' );
}
-
-
public function tearDown() {
parent::tearDown();
-
+
if( file_exists( $this->bug29408File . "." ) ) {
unlink( $this->bug29408File . "." );
}
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs