wiki.techinc.nl/tests/phpunit/includes/media/FakeDimensionFile.php
Umherirrender d9fb8bab5e Move phpunit @group from file comment to class comment
Remove @group from non tests

Change-Id: Iae9ee3bc5f539a9b4ded8374006ab2993234450e
2018-03-10 11:48:28 +01:00

35 lines
658 B
PHP

<?php
class FakeDimensionFile extends File {
public $mustRender = false;
public $mime;
public $dimensions;
public function __construct( $dimensions, $mime = 'unknown/unknown' ) {
parent::__construct( Title::makeTitle( NS_FILE, 'Test' ),
new NullRepo( null ) );
$this->dimensions = $dimensions;
$this->mime = $mime;
}
public function getWidth( $page = 1 ) {
return $this->dimensions[0];
}
public function getHeight( $page = 1 ) {
return $this->dimensions[1];
}
public function mustRender() {
return $this->mustRender;
}
public function getPath() {
return '';
}
public function getMimeType() {
return $this->mime;
}
}