r106472 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r106471‎ | r106472 | r106473 >
Date:19:59, 16 December 2011
Author:nelson
Status:resolved (Comments)
Tags:
Comment:
clean up temp files. Fixes r99546
Modified paths:
  • /trunk/phase3/tests/phpunit/includes/filerepo/StoreBatchTest.php (modified) (history)

Diff [purge]

Index: trunk/phase3/tests/phpunit/includes/filerepo/StoreBatchTest.php
@@ -9,6 +9,7 @@
1010
1111 $this->repo = RepoGroup::singleton()->getLocalRepo();
1212 $this->date = gmdate( "YmdHis" );
 13+ $this->createdFiles = array();
1314 $this->users = array(
1415 'sysop' => new ApiTestUser(
1516 'Uploadstashtestsysop',
@@ -39,6 +40,7 @@
4041
4142 $result = $this->repo->store( $srcPath, 'temp', $dstRel, $flags );
4243 $result->value = $this->repo->getVirtualUrl( 'temp' ) . '/' . $dstUrlRel;
 44+ $this->createdFiles[] = $result->value;
4345 return $result;
4446 }
4547
@@ -93,6 +95,7 @@
9496 }
9597
9698 public function tearDown() {
 99+ $this->repo->cleanupBatch( $this->createdFile );
97100 parent::tearDown();
98101
99102 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r99546Some docs and a test for FileRepo::storeBatch()nelson19:49, 11 October 2011

Comments

#Comment by Aaron Schulz (talk | contribs)   20:03, 16 December 2011
$this->repo->cleanupBatch( $this->createdFile );

Typo, not plural.

Status & tagging log