Merge "Change 'editfont' default preference to 'monospace'"
[lhc/web/wiklou.git] / tests / phpunit / includes / media / FakeDimensionFile.php
1 <?php
2
3 /**
4 * @group Media
5 */
6 class FakeDimensionFile extends File {
7 public $mustRender = false;
8 public $mime;
9 public $dimensions;
10
11 public function __construct( $dimensions, $mime = 'unknown/unknown' ) {
12 parent::__construct( Title::makeTitle( NS_FILE, 'Test' ),
13 new NullRepo( null ) );
14
15 $this->dimensions = $dimensions;
16 $this->mime = $mime;
17 }
18
19 public function getWidth( $page = 1 ) {
20 return $this->dimensions[0];
21 }
22
23 public function getHeight( $page = 1 ) {
24 return $this->dimensions[1];
25 }
26
27 public function mustRender() {
28 return $this->mustRender;
29 }
30
31 public function getPath() {
32 return '';
33 }
34
35 public function getMimeType() {
36 return $this->mime;
37 }
38 }