wiki.techinc.nl/tests/phpunit/includes/media/FakeDimensionFile.php
addshore c40786cba2 Cleanup tests/includes/media
- Adds @covers tags
- fixes comments
- fixes scope
- adds @todos
- split files per class

Change-Id: Id5aaa20769725a96f22fb838d376697c250874a5
2013-10-24 08:12:42 +00:00

28 lines
No EOL
512 B
PHP

<?php
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 '';
}
}