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
tests: Replace Bugddddd with Tddddd in test names, test strings
[lhc/web/wiklou.git]
/
tests
/
phpunit
/
includes
/
upload
/
UploadStashTest.php
diff --git
a/tests/phpunit/includes/upload/UploadStashTest.php
b/tests/phpunit/includes/upload/UploadStashTest.php
index
d754ba5
..
e796065
100644
(file)
--- a/
tests/phpunit/includes/upload/UploadStashTest.php
+++ b/
tests/phpunit/includes/upload/UploadStashTest.php
@@
-19,7
+19,7
@@
class UploadStashTest extends MediaWikiTestCase {
protected function setUp() {
parent::setUp();
protected function setUp() {
parent::setUp();
- $this->tmpFile =
wfTempDir() . '/' . uniqid
();
+ $this->tmpFile =
$this->getNewTempFile
();
file_put_contents( $this->tmpFile, "\x00" );
self::$users = [
file_put_contents( $this->tmpFile, "\x00" );
self::$users = [
@@
-38,22
+38,10
@@
class UploadStashTest extends MediaWikiTestCase {
];
}
];
}
- protected function tearDown() {
- if ( file_exists( $this->tmpFile . "." ) ) {
- unlink( $this->tmpFile . "." );
- }
-
- if ( file_exists( $this->tmpFile ) ) {
- unlink( $this->tmpFile );
- }
-
- parent::tearDown();
- }
-
/**
* @todo give this test a real name explaining what is being tested here
*/
/**
* @todo give this test a real name explaining what is being tested here
*/
- public function test
Bug29
408() {
+ public function test
T31
408() {
$this->setMwGlobals( 'wgUser', self::$users['uploader']->getUser() );
$repo = RepoGroup::singleton()->getLocalRepo();
$this->setMwGlobals( 'wgUser', self::$users['uploader']->getUser() );
$repo = RepoGroup::singleton()->getLocalRepo();
@@
-117,7
+105,7
@@
class UploadStashTest extends MediaWikiTestCase {
$stash->stashFile( $this->tmpFile );
$this->fail( 'Expected UploadStashFileException not thrown' );
} catch ( UploadStashFileException $e ) {
$stash->stashFile( $this->tmpFile );
$this->fail( 'Expected UploadStashFileException not thrown' );
} catch ( UploadStashFileException $e ) {
- $this->assertInstanceOf(
'ILocalizedException'
, $e );
+ $this->assertInstanceOf(
ILocalizedException::class
, $e );
} catch ( Exception $e ) {
$this->fail( 'Unexpected exception class ' . get_class( $e ) );
}
} catch ( Exception $e ) {
$this->fail( 'Unexpected exception class ' . get_class( $e ) );
}