protected function setUp() {
parent::setUp();
- $this->setMwGlobals( array(
+ $this->setMwGlobals( [
'wgEnableUploads' => true,
'wgEnableAPI' => true,
- ) );
+ ] );
$this->clearFakeUploads();
}
*/
public function deleteFileByTitle( $title ) {
if ( $title->exists() ) {
- $file = wfFindFile( $title, array( 'ignoreRedirect' => true ) );
+ $file = wfFindFile( $title, [ 'ignoreRedirect' => true ] );
$noOldArchive = ""; // yes this really needs to be set this way
$comment = "removing for test";
$restrictDeletedVersions = false;
throw new Exception( "couldn't stat $tmpName" );
}
- $_FILES[$fieldName] = array(
+ $_FILES[$fieldName] = [
'name' => $fileName,
'type' => $type,
'tmp_name' => $tmpName,
'size' => $size,
'error' => null
- );
+ ];
return true;
}
throw new Exception( "couldn't stat $tmpName" );
}
- $_FILES[$fieldName] = array(
+ $_FILES[$fieldName] = [
'name' => $fileName,
'type' => $type,
'tmp_name' => $tmpName,
'size' => $size,
'error' => null
- );
+ ];
}
/**
* Remove traces of previous fake uploads
*/
function clearFakeUploads() {
- $_FILES = array();
+ $_FILES = [];
}
}