*/
class ExifRotationTest extends MediaWikiTestCase {
- function setUp() {
+ protected function setUp() {
parent::setUp();
$this->handler = new BitmapHandler();
$filePath = __DIR__ . '/../../data/media';
$wgEnableAutoRotation = true;
}
- public function tearDown() {
+ protected function tearDown() {
global $wgShowEXIF, $wgEnableAutoRotation;
$wgShowEXIF = $this->show;
$wgEnableAutoRotation = $this->oldAuto;
/**
*
- * @dataProvider providerFiles
+ * @dataProvider provideFiles
*/
function testMetadata( $name, $type, $info ) {
if ( !BitmapHandler::canRotate() ) {
/**
*
- * @dataProvider providerFiles
+ * @dataProvider provideFiles
*/
function testRotationRendering( $name, $type, $info, $thumbs ) {
if ( !BitmapHandler::canRotate() ) {
}
}
+ /* Utility function */
private function dataFile( $name, $type ) {
return new UnregisteredLocalFile( false, $this->repo,
"mwstore://localtesting/data/$name", $type );
}
- function providerFiles() {
+ public static function provideFiles() {
return array(
array(
'landscape-plain.jpg',
/**
* Same as before, but with auto-rotation disabled.
- * @dataProvider providerFilesNoAutoRotate
+ * @dataProvider provideFilesNoAutoRotate
*/
function testMetadataNoAutoRotate( $name, $type, $info ) {
global $wgEnableAutoRotation;
/**
*
- * @dataProvider providerFilesNoAutoRotate
+ * @dataProvider provideFilesNoAutoRotate
*/
function testRotationRenderingNoAutoRotate( $name, $type, $info, $thumbs ) {
global $wgEnableAutoRotation;
$wgEnableAutoRotation = true;
}
- function providerFilesNoAutoRotate() {
+ public static function provideFilesNoAutoRotate() {
return array(
array(
'landscape-plain.jpg',