wiki.techinc.nl/tests/phpunit/includes/media/FakeDimensionFile.php
Umherirrender 388b0374fa tests: Use namespaced classes
Changes to the use statements done automatically via script
Addition of missing use statements and changes to docs done manually

Change-Id: Ib326ae1e5c8409a98398c721e8b8ce42c73bd012
2023-12-11 15:59:55 +01:00

37 lines
686 B
PHP

<?php
use MediaWiki\Title\Title;
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;
}
}