rdbms: Rename "memCache" to "memStash" in LBFactory
[mediawiki.git] / tests / phpunit / includes / media / FakeDimensionFile.php
blob81e820e0d6d0c7d957521f9c88741b0d28857149
1 <?php
3 /**
4 * @group Media
5 */
6 class FakeDimensionFile extends File {
7 public $mustRender = false;
8 public $mime;
9 public $dimensions;
11 public function __construct( $dimensions, $mime = 'unknown/unknown' ) {
12 parent::__construct( Title::makeTitle( NS_FILE, 'Test' ),
13 new NullRepo( null ) );
15 $this->dimensions = $dimensions;
16 $this->mime = $mime;
19 public function getWidth( $page = 1 ) {
20 return $this->dimensions[0];
23 public function getHeight( $page = 1 ) {
24 return $this->dimensions[1];
27 public function mustRender() {
28 return $this->mustRender;
31 public function getPath() {
32 return '';
35 public function getMimeType() {
36 return $this->mime;