<?php
+
/**
* @group FileRepo
* @group medium
*/
class StoreBatchTest extends MediaWikiTestCase {
+ protected $createdFiles;
+ protected $date;
+ /** @var FileRepo */
+ protected $repo;
+
protected function setUp() {
global $wgFileBackends;
parent::setUp();
$useConfig = $conf;
}
}
+ $useConfig['lockManager'] = LockManagerGroup::singleton()->get( $useConfig['lockManager'] );
+ unset( $useConfig['fileJournal'] );
$useConfig['name'] = 'local-testing'; // swap name
$class = $useConfig['class'];
$backend = new $class( $useConfig );
} else {
$backend = new FSFileBackend( array(
'name' => 'local-testing',
- 'lockManager' => 'nullLockManager',
+ 'wikiId' => wfWikiID(),
'containerPaths' => array(
'unittests-public' => "{$tmpPrefix}-public",
'unittests-thumb' => "{$tmpPrefix}-thumb",
* @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 );
* @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 );
$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 );