* Whack @group Media everywhere * If testing access to a nonexistent file, make it obvious from its name * Grammar Change-Id: I845b484b78b3eb1e5a97f339777d3b7c9ee17712
31 lines
537 B
PHP
31 lines
537 B
PHP
<?php
|
|
|
|
/**
|
|
* @group Media
|
|
*/
|
|
class FakeDimensionFile extends File {
|
|
public $mustRender = false;
|
|
|
|
public function __construct( $dimensions ) {
|
|
parent::__construct( Title::makeTitle( NS_FILE, 'Test' ),
|
|
new NullRepo( null ) );
|
|
|
|
$this->dimensions = $dimensions;
|
|
}
|
|
|
|
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 '';
|
|
}
|
|
}
|