Remove very, very old disabled test cases and todos
authorThiemo Mättig <thiemo.maettig@wikimedia.de>
Thu, 28 Dec 2017 15:21:02 +0000 (16:21 +0100)
committerThiemo Kreuz (WMDE) <thiemo.kreuz@wikimedia.de>
Thu, 28 Dec 2017 18:44:31 +0000 (18:44 +0000)
Some of this is from 2011.

Change-Id: I3cf78e6b451af92063746af87c25c1d352ce94da

tests/phpunit/includes/HtmlTest.php
tests/phpunit/includes/MWNamespaceTest.php
tests/phpunit/includes/content/ContentHandlerTest.php
tests/phpunit/includes/content/WikitextContentHandlerTest.php
tests/phpunit/includes/media/PNGMetadataExtractorTest.php

index 7e32770..6695fce 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-/** tests for includes/Html.php */
 
 class HtmlTest extends MediaWikiTestCase {
 
index 91101bd..f705537 100644 (file)
@@ -5,11 +5,8 @@
  * @file
  */
 
-/**
- * Test class for MWNamespace.
- * @todo FIXME: this test file is a mess
- */
 class MWNamespaceTest extends MediaWikiTestCase {
+
        protected function setUp() {
                parent::setUp();
 
@@ -26,15 +23,12 @@ class MWNamespaceTest extends MediaWikiTestCase {
                ] );
        }
 
-# ### START OF TESTS #########################################################
-
        /**
         * @todo Write more texts, handle $wgAllowImageMoving setting
         * @covers MWNamespace::isMovable
         */
        public function testIsMovable() {
                $this->assertFalse( MWNamespace::isMovable( NS_SPECIAL ) );
-               # @todo FIXME: Write more tests!!
        }
 
        /**
@@ -153,18 +147,6 @@ class MWNamespaceTest extends MediaWikiTestCase {
                $this->assertNull( MWNamespace::getAssociated( NS_SPECIAL ) );
        }
 
-       /**
-        * @todo Implement testExists().
-        */
-       /*
-       public function testExists() {
-               // Remove the following lines when you implement this test.
-               $this->markTestIncomplete(
-                       'This test has not been implemented yet. Rely on $wgCanonicalNamespaces.'
-               );
-       }
-       */
-
        /**
         * Test MWNamespace::equals
         * Note if we add a namespace registration system with keys like 'MAIN'
@@ -215,52 +197,6 @@ class MWNamespaceTest extends MediaWikiTestCase {
                );
        }
 
-       /**
-        * @todo Implement testGetCanonicalNamespaces().
-        */
-       /*
-       public function testGetCanonicalNamespaces() {
-               // Remove the following lines when you implement this test.
-               $this->markTestIncomplete(
-                       'This test has not been implemented yet. Rely on $wgCanonicalNamespaces.'
-               );
-       }
-       */
-       /**
-        * @todo Implement testGetCanonicalName().
-        */
-       /*
-               public function testGetCanonicalName() {
-                       // Remove the following lines when you implement this test.
-                       $this->markTestIncomplete(
-                               'This test has not been implemented yet. Rely on $wgCanonicalNamespaces.'
-                       );
-               }
-       */
-       /**
-        * @todo Implement testGetCanonicalIndex().
-        */
-       /*
-       public function testGetCanonicalIndex() {
-               // Remove the following lines when you implement this test.
-               $this->markTestIncomplete(
-                       'This test has not been implemented yet. Rely on $wgCanonicalNamespaces.'
-               );
-       }
-       */
-
-       /**
-        * @todo Implement testGetValidNamespaces().
-        */
-       /*
-       public function testGetValidNamespaces() {
-               // Remove the following lines when you implement this test.
-               $this->markTestIncomplete(
-                       'This test has not been implemented yet. Rely on $wgCanonicalNamespaces.'
-               );
-       }
-       */
-
        public function provideHasTalkNamespace() {
                return [
                        [ NS_MEDIA, false ],
index 1462c36..786788b 100644 (file)
@@ -248,10 +248,6 @@ class ContentHandlerTest extends MediaWikiTestCase {
                $this->assertNull( $text );
        }
 
-       /*
-       public static function makeContent( $text, Title $title, $modelId = null, $format = null ) {}
-       */
-
        public static function dataMakeContent() {
                return [
                        [ 'hallo', 'Help:Test', null, null, CONTENT_MODEL_WIKITEXT, 'hallo', false ],
@@ -370,12 +366,6 @@ class ContentHandlerTest extends MediaWikiTestCase {
                $this->assertSame( $tag, 'mw-contentmodelchange' );
        }
 
-       /*
-       public function testSupportsSections() {
-               $this->markTestIncomplete( "not yet implemented" );
-       }
-       */
-
        /**
         * @covers ContentHandler::supportsCategories
         */
index 02f82f4..dfc07c9 100644 (file)
@@ -335,23 +335,6 @@ class WikitextContentHandlerTest extends MediaWikiLangTestCase {
                $this->assertSame( $expected, $tag );
        }
 
-       /**
-        * @todo Text case requires database, should be done by a test class in the Database group
-        */
-       /*
-       public function testGetAutoDeleteReason( Title $title, &$hasHistory ) {}
-       */
-
-       /**
-        * @todo Text case requires database, should be done by a test class in the Database group
-        */
-       /*
-       public function testGetUndoContent( Revision $current, Revision $undo,
-               Revision $undoafter = null
-       ) {
-       }
-       */
-
        /**
         * @covers WikitextContentHandler::getDataForSearchIndex
         */
index a9eaa9e..22de935 100644 (file)
@@ -65,24 +65,6 @@ class PNGMetadataExtractorTest extends MediaWikiTestCase {
                $this->assertEquals( $expected, $meta['Copyright']['x-default'] );
        }
 
-       /**
-        * Test extraction of pHYs tags, which can tell what the
-        * actual resolution of the image is (aka in dots per meter).
-        */
-       /*
-       public function testPngPhysTag() {
-               $meta = PNGMetadataExtractor::getMetadata( $this->filePath .
-                       'Png-native-test.png' );
-
-               $this->assertArrayHasKey( 'text', $meta );
-               $meta = $meta['text'];
-
-               $this->assertEquals( '2835/100', $meta['XResolution'] );
-               $this->assertEquals( '2835/100', $meta['YResolution'] );
-               $this->assertEquals( 3, $meta['ResolutionUnit'] ); // 3 = cm
-       }
-       */
-
        /**
         * Given a normal static PNG, check the animation metadata returned.
         */