dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add @covers tags to media tests
[lhc/web/wiklou.git]
/
tests
/
phpunit
/
includes
/
media
/
MediaWikiMediaTestCase.php
diff --git
a/tests/phpunit/includes/media/MediaWikiMediaTestCase.php
b/tests/phpunit/includes/media/MediaWikiMediaTestCase.php
index
5887d38
..
a4e8056
100644
(file)
--- a/
tests/phpunit/includes/media/MediaWikiMediaTestCase.php
+++ b/
tests/phpunit/includes/media/MediaWikiMediaTestCase.php
@@
-1,10
+1,10
@@
<?php
/**
<?php
/**
- * Specificly for testing Media handlers. Sets up a F
SFile
backend
+ * Specificly for testing Media handlers. Sets up a F
ileRepo
backend
*/
abstract class MediaWikiMediaTestCase extends MediaWikiTestCase {
*/
abstract class MediaWikiMediaTestCase extends MediaWikiTestCase {
- /** @var F
S
Repo */
+ /** @var F
ile
Repo */
protected $repo;
/** @var FSFileBackend */
protected $backend;
protected $repo;
/** @var FSFileBackend */
protected $backend;
@@
-19,20
+19,21
@@
abstract class MediaWikiMediaTestCase extends MediaWikiTestCase {
if ( $this->createsThumbnails() ) {
// We need a temp directory for the thumbnails
// the container is named 'temp-thumb' because it is the
if ( $this->createsThumbnails() ) {
// We need a temp directory for the thumbnails
// the container is named 'temp-thumb' because it is the
- // thumb directory for a
FSR
epo named "temp".
+ // thumb directory for a
r
epo named "temp".
$containers['temp-thumb'] = $this->getNewTempDirectory();
}
$this->backend = new FSFileBackend( [
'name' => 'localtesting',
$containers['temp-thumb'] = $this->getNewTempDirectory();
}
$this->backend = new FSFileBackend( [
'name' => 'localtesting',
- 'wikiId' => wfWikiId(),
- 'containerPaths' => $containers
+ 'wikiId' => wfWikiID(),
+ 'containerPaths' => $containers,
+ 'tmpDirectory' => $this->getNewTempDirectory()
] );
] );
- $this->repo = new F
S
Repo( $this->getRepoOptions() );
+ $this->repo = new F
ile
Repo( $this->getRepoOptions() );
}
/**
}
/**
- * @return array Argument for F
S
Repo constructor
+ * @return array Argument for F
ile
Repo constructor
*/
protected function getRepoOptions() {
return [
*/
protected function getRepoOptions() {
return [
@@
-75,7
+76,7
@@
abstract class MediaWikiMediaTestCase extends MediaWikiTestCase {
protected function dataFile( $name, $type = null ) {
if ( !$type ) {
// Autodetect by file extension for the lazy.
protected function dataFile( $name, $type = null ) {
if ( !$type ) {
// Autodetect by file extension for the lazy.
- $magic = M
imeMagic::singleton
();
+ $magic = M
ediaWiki\MediaWikiServices::getInstance()->getMimeAnalyzer
();
$parts = explode( $name, '.' );
$type = $magic->guessTypesForExtension( $parts[count( $parts ) - 1] );
}
$parts = explode( $name, '.' );
$type = $magic->guessTypesForExtension( $parts[count( $parts ) - 1] );
}