Clean and repair many phpunit tests (+ fix implied configuration)
[lhc/web/wiklou.git] / tests / phpunit / includes / media / ExifRotationTest.php
index 6af52dd..692a5f9 100644 (file)
@@ -5,7 +5,7 @@
  */
 class ExifRotationTest extends MediaWikiTestCase {
 
-       function setUp() {
+       protected function setUp() {
                parent::setUp();
                $this->handler = new BitmapHandler();
                $filePath = __DIR__ . '/../../data/media';
@@ -33,7 +33,7 @@ class ExifRotationTest extends MediaWikiTestCase {
                $wgEnableAutoRotation = true;
        }
 
-       public function tearDown() {
+       protected function tearDown() {
                global $wgShowEXIF, $wgEnableAutoRotation;
                $wgShowEXIF = $this->show;
                $wgEnableAutoRotation = $this->oldAuto;
@@ -43,7 +43,7 @@ class ExifRotationTest extends MediaWikiTestCase {
 
        /**
         *
-        * @dataProvider providerFiles
+        * @dataProvider provideFiles
         */
        function testMetadata( $name, $type, $info ) {
                if ( !BitmapHandler::canRotate() ) {
@@ -56,7 +56,7 @@ class ExifRotationTest extends MediaWikiTestCase {
 
        /**
         *
-        * @dataProvider providerFiles
+        * @dataProvider provideFiles
         */
        function testRotationRendering( $name, $type, $info, $thumbs ) {
                if ( !BitmapHandler::canRotate() ) {
@@ -94,12 +94,13 @@ class ExifRotationTest extends MediaWikiTestCase {
                }
        }
 
+       /* 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',
@@ -134,7 +135,7 @@ class ExifRotationTest extends MediaWikiTestCase {
 
        /**
         * Same as before, but with auto-rotation disabled.
-        * @dataProvider providerFilesNoAutoRotate
+        * @dataProvider provideFilesNoAutoRotate
         */
        function testMetadataNoAutoRotate( $name, $type, $info ) {
                global $wgEnableAutoRotation;
@@ -149,7 +150,7 @@ class ExifRotationTest extends MediaWikiTestCase {
 
        /**
         *
-        * @dataProvider providerFilesNoAutoRotate
+        * @dataProvider provideFilesNoAutoRotate
         */
        function testRotationRenderingNoAutoRotate( $name, $type, $info, $thumbs ) {
                global $wgEnableAutoRotation;
@@ -188,7 +189,7 @@ class ExifRotationTest extends MediaWikiTestCase {
                $wgEnableAutoRotation = true;
        }
 
-       function providerFilesNoAutoRotate() {
+       public static function provideFilesNoAutoRotate() {
                return array(
                        array(
                                'landscape-plain.jpg',