<?php
+use MediaWiki\MediaWikiServices;
use Wikimedia\TestingAccessWrapper;
/**
'name' => 'localtesting',
'lockManager' => LockManagerGroup::singleton()->get( 'fsLockManager' ),
'parallelize' => 'implicit',
- 'wikiId' => wfWikiID() . wfRandomString(),
+ 'wikiId' => 'testdb',
'backends' => [
[
'name' => 'localmultitesting1',
$this->assertEquals( false, $this->backend->fileExists( [ 'src' => $dest ] ),
"Destination file $dest does not exist ($backendName)." );
- return; // done
+ return;
}
$status = $this->backend->doOperation(
$this->assertEquals( false, $this->backend->fileExists( [ 'src' => $dest ] ),
"Destination file $dest does not exist ($backendName)." );
- return; // done
+ return;
}
$status = $this->backend->doOperation(
$url = $this->backend->getFileHttpUrl( [ 'src' => $source ] );
if ( $url !== null ) { // supported
- $data = Http::request( "GET", $url, [], __METHOD__ );
+ $data = MediaWikiServices::getInstance()->getHttpRequestFactory()->
+ get( $url, [], __METHOD__ );
$this->assertEquals( $content, $data,
"HTTP GET of URL has right contents ($backendName)." );
}
'wikiId' => wfWikiID()
] ) );
- $name = wfRandomString( 300 );
-
$input = [
'headers' => [
- 'content-Disposition' => FileBackend::makeContentDisposition( 'inline', $name ),
+ 'content-Disposition' => FileBackend::makeContentDisposition( 'inline', 'name' ),
'Content-dUration' => 25.6,
'X-LONG-VALUE' => str_pad( '0', 300 ),
'CONTENT-LENGTH' => 855055,
];
$expected = [
'headers' => [
- 'content-disposition' => FileBackend::makeContentDisposition( 'inline', $name ),
+ 'content-disposition' => FileBackend::makeContentDisposition( 'inline', 'name' ),
'content-duration' => 25.6,
'content-length' => 855055
]