Index: trunk/phase3/tests/phpunit/includes/upload/UploadStashTest.php |
— | — | @@ -10,11 +10,11 @@ |
11 | 11 | |
12 | 12 | public function setUp() { |
13 | 13 | parent::setUp(); |
14 | | - |
| 14 | + |
15 | 15 | // Setup a file for bug 29408 |
16 | 16 | $this->bug29408File = dirname( __FILE__ ) . '/bug29408'; |
17 | | - file_put_contents( $this->bug29408File, "\x00" ); |
18 | | - |
| 17 | + file_put_contents( $this->bug29408File, "\x00" ); |
| 18 | + |
19 | 19 | self::$users = array( |
20 | 20 | 'sysop' => new ApiTestUser( |
21 | 21 | 'Uploadstashtestsysop', |
— | — | @@ -30,21 +30,19 @@ |
31 | 31 | ) |
32 | 32 | ); |
33 | 33 | } |
34 | | - |
| 34 | + |
35 | 35 | public function testBug29408() { |
36 | 36 | global $wgUser; |
37 | 37 | $wgUser = self::$users['uploader']->user; |
38 | | - |
| 38 | + |
39 | 39 | $repo = RepoGroup::singleton()->getLocalRepo(); |
40 | 40 | $stash = new UploadStash( $repo ); |
41 | 41 | |
42 | | - $this->markTestIncomplete( 'Broken' ); |
43 | | - |
44 | 42 | // Throws exception caught by PHPUnit on failure |
45 | 43 | $file = $stash->stashFile( $this->bug29408File ); |
46 | 44 | // We'll never reach this point if we hit bug 29408 |
47 | 45 | $this->assertTrue( true, 'Unrecognized file without extension' ); |
48 | | - |
| 46 | + |
49 | 47 | $stash->removeFile( $file->getFileKey() ); |
50 | 48 | } |
51 | 49 | |
— | — | @@ -65,11 +63,9 @@ |
66 | 64 | $this->assertTrue( UploadFromStash::isValidRequest($request), 'Check key precedence' ); |
67 | 65 | } |
68 | 66 | |
69 | | - |
70 | | - |
71 | 67 | public function tearDown() { |
72 | 68 | parent::tearDown(); |
73 | | - |
| 69 | + |
74 | 70 | if( file_exists( $this->bug29408File . "." ) ) { |
75 | 71 | unlink( $this->bug29408File . "." ); |
76 | 72 | } |
Index: trunk/phase3/tests/parser/parserTest.inc |
— | — | @@ -159,10 +159,10 @@ |
160 | 160 | 'name' => 'local-backend', |
161 | 161 | 'lockManager' => 'fsLockManager', |
162 | 162 | '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', |
167 | 167 | ) |
168 | 168 | ) ) |
169 | 169 | ); |
— | — | @@ -637,10 +637,10 @@ |
638 | 638 | 'name' => 'local-backend', |
639 | 639 | 'lockManager' => 'fsLockManager', |
640 | 640 | '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', |
645 | 645 | ) |
646 | 646 | ) ) |
647 | 647 | ), |