Change-Id: I4bef0fc377a928cf403d2bc187ed0a10154feb18
*/
use Wikimedia\AtEase\AtEase;
*/
use Wikimedia\AtEase\AtEase;
+use Wikimedia\Timestamp\ConvertibleTimestamp;
/**
* Simulation of a backend storage in memory.
/**
* Simulation of a backend storage in memory.
$this->files[$dst] = [
'data' => $params['content'],
$this->files[$dst] = [
'data' => $params['content'],
- 'mtime' => wfTimestamp( TS_MW, time() )
+ 'mtime' => ConvertibleTimestamp::convert( TS_MW, time() )
$this->files[$dst] = [
'data' => $data,
$this->files[$dst] = [
'data' => $data,
- 'mtime' => wfTimestamp( TS_MW, time() )
+ 'mtime' => ConvertibleTimestamp::convert( TS_MW, time() )
$this->files[$dst] = [
'data' => $this->files[$src]['data'],
$this->files[$dst] = [
'data' => $this->files[$src]['data'],
- 'mtime' => wfTimestamp( TS_MW, time() )
+ 'mtime' => ConvertibleTimestamp::convert( TS_MW, time() )
*/
use Wikimedia\AtEase\AtEase;
*/
use Wikimedia\AtEase\AtEase;
+use Wikimedia\Timestamp\ConvertibleTimestamp;
/**
* Class representing a non-directory file on the file system
/**
* Class representing a non-directory file on the file system
* @return int|bool
*/
public function getSize() {
* @return int|bool
*/
public function getSize() {
- return filesize( $this->path );
+ AtEase::suppressWarnings();
+ $size = filesize( $this->path );
+ AtEase::restoreWarnings();
+
+ return $size;
$timestamp = filemtime( $this->path );
AtEase::restoreWarnings();
if ( $timestamp !== false ) {
$timestamp = filemtime( $this->path );
AtEase::restoreWarnings();
if ( $timestamp !== false ) {
- $timestamp = wfTimestamp( TS_MW, $timestamp );
+ $timestamp = ConvertibleTimestamp::convert( TS_MW, $timestamp );