From 29eebc677349bf173001c452290f2272bffc59c6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Thiemo=20M=C3=A4ttig?= Date: Thu, 28 Dec 2017 16:21:02 +0100 Subject: [PATCH] Remove very, very old disabled test cases and todos Some of this is from 2011. Change-Id: I3cf78e6b451af92063746af87c25c1d352ce94da --- tests/phpunit/includes/HtmlTest.php | 1 - tests/phpunit/includes/MWNamespaceTest.php | 66 +------------------ .../includes/content/ContentHandlerTest.php | 10 --- .../content/WikitextContentHandlerTest.php | 17 ----- .../media/PNGMetadataExtractorTest.php | 18 ----- 5 files changed, 1 insertion(+), 111 deletions(-) diff --git a/tests/phpunit/includes/HtmlTest.php b/tests/phpunit/includes/HtmlTest.php index 7e32770b33..6695fce3ba 100644 --- a/tests/phpunit/includes/HtmlTest.php +++ b/tests/phpunit/includes/HtmlTest.php @@ -1,5 +1,4 @@ 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 ], diff --git a/tests/phpunit/includes/content/ContentHandlerTest.php b/tests/phpunit/includes/content/ContentHandlerTest.php index 1462c3627e..786788bf1a 100644 --- a/tests/phpunit/includes/content/ContentHandlerTest.php +++ b/tests/phpunit/includes/content/ContentHandlerTest.php @@ -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 */ diff --git a/tests/phpunit/includes/content/WikitextContentHandlerTest.php b/tests/phpunit/includes/content/WikitextContentHandlerTest.php index 02f82f4dac..dfc07c90f1 100644 --- a/tests/phpunit/includes/content/WikitextContentHandlerTest.php +++ b/tests/phpunit/includes/content/WikitextContentHandlerTest.php @@ -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 */ diff --git a/tests/phpunit/includes/media/PNGMetadataExtractorTest.php b/tests/phpunit/includes/media/PNGMetadataExtractorTest.php index a9eaa9e7c5..22de935793 100644 --- a/tests/phpunit/includes/media/PNGMetadataExtractorTest.php +++ b/tests/phpunit/includes/media/PNGMetadataExtractorTest.php @@ -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. */ -- 2.20.1