summaryrefslogtreecommitdiff
path: root/tests/phpunit/includes/filerepo/StoreBatchTest.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2013-12-08 09:55:49 +0100
committerPierre Schmitz <pierre@archlinux.de>2013-12-08 09:55:49 +0100
commit4ac9fa081a7c045f6a9f1cfc529d82423f485b2e (patch)
treeaf68743f2f4a47d13f2b0eb05f5c4aaf86d8ea37 /tests/phpunit/includes/filerepo/StoreBatchTest.php
parentaf4da56f1ad4d3ef7b06557bae365da2ea27a897 (diff)
Update to MediaWiki 1.22.0
Diffstat (limited to 'tests/phpunit/includes/filerepo/StoreBatchTest.php')
-rw-r--r--tests/phpunit/includes/filerepo/StoreBatchTest.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/phpunit/includes/filerepo/StoreBatchTest.php b/tests/phpunit/includes/filerepo/StoreBatchTest.php
index a89ef98e..b33c1bbb 100644
--- a/tests/phpunit/includes/filerepo/StoreBatchTest.php
+++ b/tests/phpunit/includes/filerepo/StoreBatchTest.php
@@ -1,10 +1,16 @@
<?php
+
/**
* @group FileRepo
* @group medium
*/
class StoreBatchTest extends MediaWikiTestCase {
+ protected $createdFiles;
+ protected $date;
+ /** @var FileRepo */
+ protected $repo;
+
protected function setUp() {
global $wgFileBackends;
parent::setUp();
@@ -60,6 +66,7 @@ class StoreBatchTest extends MediaWikiTestCase {
* @param $originalName string The title of the image
* @param $srcPath string The filepath or virtual URL
* @param $flags integer Flags to pass into repo::store().
+ * @return FileRepoStatus
*/
private function storeit( $originalName, $srcPath, $flags ) {
$hashPath = $this->repo->getHashPath( $originalName );
@@ -69,6 +76,7 @@ class StoreBatchTest extends MediaWikiTestCase {
$result = $this->repo->store( $srcPath, 'temp', $dstRel, $flags );
$result->value = $this->repo->getVirtualUrl( 'temp' ) . '/' . $dstUrlRel;
$this->createdFiles[] = $result->value;
+
return $result;
}
@@ -78,7 +86,7 @@ class StoreBatchTest extends MediaWikiTestCase {
* @param $fn string The title of the image
* @param $infn string The name of the file (in the filesystem)
* @param $otherfn string The name of the different file (in the filesystem)
- * @param $fromrepo logical 'true' if we want to copy from a virtual URL out of the Repo.
+ * @param $fromrepo bool 'true' if we want to copy from a virtual URL out of the Repo.
*/
private function storecohort( $fn, $infn, $otherfn, $fromrepo ) {
$f = $this->storeit( $fn, $infn, 0 );
@@ -115,6 +123,9 @@ class StoreBatchTest extends MediaWikiTestCase {
$this->assertEquals( $f->successCount, 0, "counts wrong {$f->successCount} {$f->failCount}" );
}
+ /**
+ * @covers FileRepo::store
+ */
public function teststore() {
global $IP;
$this->storecohort( "Test1.png", "$IP/skins/monobook/wiki.png", "$IP/skins/monobook/video.png", false );