Index: trunk/phase3/tests/phpunit/includes/filerepo/StoreBatchTest.php |
— | — | @@ -6,8 +6,20 @@ |
7 | 7 | |
8 | 8 | public function setUp() { |
9 | 9 | parent::setUp(); |
10 | | - |
11 | | - $this->repo = RepoGroup::singleton()->getLocalRepo(); |
| 10 | + $tmpDir = wfTempDir() . '/' . time() . '-' . mt_rand(); |
| 11 | + $this->repo = new FSRepo( array( |
| 12 | + 'name' => 'test', |
| 13 | + 'backend' => new FSFileBackend( array( |
| 14 | + 'name' => 'local-backend', |
| 15 | + 'lockManager' => 'nullLockManager', |
| 16 | + 'containerPaths' => array( |
| 17 | + 'test-public' => "$tmpDir/public", |
| 18 | + 'test-thumb' => "$tmpDir/thumb", |
| 19 | + 'test-temp' => "$tmpDir/temp", |
| 20 | + 'test-deleted' => "$tmpDir/deleted", |
| 21 | + ) |
| 22 | + ) ) |
| 23 | + ) ); |
12 | 24 | $this->date = gmdate( "YmdHis" ); |
13 | 25 | $this->createdFiles = array(); |
14 | 26 | $this->users = array( |
— | — | @@ -43,8 +55,7 @@ |
44 | 56 | $this->createdFiles[] = $result->value; |
45 | 57 | return $result; |
46 | 58 | } |
47 | | - |
48 | | - |
| 59 | + |
49 | 60 | /** |
50 | 61 | * Test storing a file using different flags. |
51 | 62 | * |
— | — | @@ -97,6 +108,5 @@ |
98 | 109 | public function tearDown() { |
99 | 110 | $this->repo->cleanupBatch( $this->createdFiles ); |
100 | 111 | parent::tearDown(); |
101 | | - |
102 | 112 | } |
103 | 113 | } |