Add @covers tags to ContentHandler tests
authorKunal Mehta <legoktm@member.fsf.org>
Mon, 25 Dec 2017 01:08:48 +0000 (17:08 -0800)
committerUmherirrender <umherirrender_de.wp@web.de>
Wed, 27 Dec 2017 17:48:56 +0000 (17:48 +0000)
Change-Id: I4d0994e91f63a0921343f34ef81a82463b4ab969

tests/phpunit/includes/content/ContentHandlerTest.php
tests/phpunit/includes/content/CssContentTest.php
tests/phpunit/includes/content/FileContentHandlerTest.php
tests/phpunit/includes/content/JavaScriptContentTest.php
tests/phpunit/includes/content/TextContentHandlerTest.php
tests/phpunit/includes/content/WikitextContentHandlerTest.php
tests/phpunit/includes/content/WikitextStructureTest.php

index 1bd2eb0..1462c36 100644 (file)
@@ -332,7 +332,9 @@ class ContentHandlerTest extends MediaWikiTestCase {
                }
        }
 
                }
        }
 
-       /*
+       /**
+        * @covers ContentHandler::getAutosummary
+        *
         * Test if we become a "Created blank page" summary from getAutoSummary if no Content added to
         * page.
         */
         * Test if we become a "Created blank page" summary from getAutoSummary if no Content added to
         * page.
         */
@@ -374,11 +376,17 @@ class ContentHandlerTest extends MediaWikiTestCase {
        }
        */
 
        }
        */
 
+       /**
+        * @covers ContentHandler::supportsCategories
+        */
        public function testSupportsCategories() {
                $handler = new DummyContentHandlerForTesting( CONTENT_MODEL_WIKITEXT );
                $this->assertTrue( $handler->supportsCategories(), 'content model supports categories' );
        }
 
        public function testSupportsCategories() {
                $handler = new DummyContentHandlerForTesting( CONTENT_MODEL_WIKITEXT );
                $this->assertTrue( $handler->supportsCategories(), 'content model supports categories' );
        }
 
+       /**
+        * @covers ContentHandler::supportsDirectEditing
+        */
        public function testSupportsDirectEditing() {
                $handler = new DummyContentHandlerForTesting( CONTENT_MODEL_JSON );
                $this->assertFalse( $handler->supportsDirectEditing(), 'direct editing is not supported' );
        public function testSupportsDirectEditing() {
                $handler = new DummyContentHandlerForTesting( CONTENT_MODEL_JSON );
                $this->assertFalse( $handler->supportsDirectEditing(), 'direct editing is not supported' );
@@ -407,6 +415,7 @@ class ContentHandlerTest extends MediaWikiTestCase {
        }
 
        /**
        }
 
        /**
+        * @covers ContentHandler::getForModelID
         * @dataProvider provideGetModelForID
         */
        public function testGetModelForID( $modelId, $handlerClass ) {
         * @dataProvider provideGetModelForID
         */
        public function testGetModelForID( $modelId, $handlerClass ) {
@@ -415,6 +424,9 @@ class ContentHandlerTest extends MediaWikiTestCase {
                $this->assertInstanceOf( $handlerClass, $handler );
        }
 
                $this->assertInstanceOf( $handlerClass, $handler );
        }
 
+       /**
+        * @covers ContentHandler::getFieldsForSearchIndex
+        */
        public function testGetFieldsForSearchIndex() {
                $searchEngine = $this->newSearchEngine();
 
        public function testGetFieldsForSearchIndex() {
                $searchEngine = $this->newSearchEngine();
 
index d2078d7..1e82fdd 100644 (file)
@@ -83,6 +83,7 @@ class CssContentTest extends JavaScriptContentTest {
        }
 
        /**
        }
 
        /**
+        * @covers CssContent::getRedirectTarget
         * @dataProvider provideGetRedirectTarget
         */
        public function testGetRedirectTarget( $title, $text ) {
         * @dataProvider provideGetRedirectTarget
         */
        public function testGetRedirectTarget( $title, $text ) {
index 65efcc9..ad9d419 100644 (file)
@@ -2,6 +2,8 @@
 
 /**
  * @group ContentHandler
 
 /**
  * @group ContentHandler
+ *
+ * @covers FileContentHandler
  */
 class FileContentHandlerTest extends MediaWikiLangTestCase {
        /**
  */
 class FileContentHandlerTest extends MediaWikiLangTestCase {
        /**
index 1c746bc..434e17c 100644 (file)
@@ -294,6 +294,7 @@ class JavaScriptContentTest extends TextContentTest {
        }
 
        /**
        }
 
        /**
+        * @covers JavaScriptContent::getRedirectTarget
         * @dataProvider provideGetRedirectTarget
         */
        public function testGetRedirectTarget( $title, $text ) {
         * @dataProvider provideGetRedirectTarget
         */
        public function testGetRedirectTarget( $title, $text ) {
index 7d9f74e..a85215b 100644 (file)
@@ -4,6 +4,9 @@
  * @group ContentHandler
  */
 class TextContentHandlerTest extends MediaWikiLangTestCase {
  * @group ContentHandler
  */
 class TextContentHandlerTest extends MediaWikiLangTestCase {
+       /**
+        * @covers TextContentHandler::supportsDirectEditing
+        */
        public function testSupportsDirectEditing() {
                $handler = new TextContentHandler();
                $this->assertTrue( $handler->supportsDirectEditing(), 'direct editing is supported' );
        public function testSupportsDirectEditing() {
                $handler = new TextContentHandler();
                $this->assertTrue( $handler->supportsDirectEditing(), 'direct editing is supported' );
index 77cfb92..02f82f4 100644 (file)
@@ -115,6 +115,9 @@ class WikitextContentHandlerTest extends MediaWikiLangTestCase {
                $this->assertEquals( $supported, $this->handler->isSupportedFormat( $format ) );
        }
 
                $this->assertEquals( $supported, $this->handler->isSupportedFormat( $format ) );
        }
 
+       /**
+        * @covers WikitextContentHandler::supportsDirectEditing
+        */
        public function testSupportsDirectEditing() {
                $handler = new WikiTextContentHandler();
                $this->assertTrue( $handler->supportsDirectEditing(), 'direct editing is supported' );
        public function testSupportsDirectEditing() {
                $handler = new WikiTextContentHandler();
                $this->assertTrue( $handler->supportsDirectEditing(), 'direct editing is supported' );
@@ -349,6 +352,9 @@ class WikitextContentHandlerTest extends MediaWikiLangTestCase {
        }
        */
 
        }
        */
 
+       /**
+        * @covers WikitextContentHandler::getDataForSearchIndex
+        */
        public function testDataIndexFieldsFile() {
                $mockEngine = $this->createMock( 'SearchEngine' );
                $title = Title::newFromText( 'Somefile.jpg', NS_FILE );
        public function testDataIndexFieldsFile() {
                $mockEngine = $this->createMock( 'SearchEngine' );
                $title = Title::newFromText( 'Somefile.jpg', NS_FILE );
index f1b54f6..1bdbe01 100644 (file)
@@ -1,5 +1,8 @@
 <?php
 
 <?php
 
+/**
+ * @covers WikiTextStructure
+ */
 class WikitextStructureTest extends MediaWikiLangTestCase {
 
        private function getMockTitle() {
 class WikitextStructureTest extends MediaWikiLangTestCase {
 
        private function getMockTitle() {