Add missing namespace to @covers comments
authorTimo Tijhof <krinklemail@gmail.com>
Tue, 23 Feb 2016 03:18:31 +0000 (03:18 +0000)
committerTimo Tijhof <krinklemail@gmail.com>
Tue, 23 Feb 2016 03:56:49 +0000 (03:56 +0000)
PHP_CodeCoverage_Exception:
> Trying to @cover not existing method "SwiftFileBackend::sanitzeHdrs".
> Trying to @cover not existing method "LineFormatter::normalizeException".
> Trying to @cover not existing method "MonologSpi::mergeConfig".
> Trying to @cover not existing method "ProcessCacheLRU::het".
> Trying to @cover not existing method "BitmapHandler::swapICCProfile".
> Trying to @cover not existing class or interface "checkParseSafety".
> Trying to @cover not existing method "Article::__call". (was removed).
> Trying to @cover not existing method "ExtensionProcessor::extracttExtensionMessagesFiles".
> Trying to @cover not existing method "FileContentsHasher::getFileContentHash".

Makes code coverage run fail at the moment. These used to be warnings
in PHPUnit 3.x, but are now hard exceptions in PHPUnit 4.x when requesting
a coverage report.

Change-Id: If7f45ca57fd7d480d35b1414a889398837c0c472

tests/phpunit/includes/debug/logger/MonologSpiTest.php
tests/phpunit/includes/debug/logger/monolog/LineFormatterTest.php
tests/phpunit/includes/filebackend/SwiftFileBackendTest.php
tests/phpunit/includes/libs/ProcessCacheLRUTest.php
tests/phpunit/includes/media/ExifBitmapTest.php
tests/phpunit/includes/media/XMPTest.php
tests/phpunit/includes/page/ArticleTest.php
tests/phpunit/includes/registration/ExtensionProcessorTest.php
tests/phpunit/includes/utils/FileContentsHasherTest.php

index 206362f..0ee7d26 100644 (file)
@@ -26,7 +26,7 @@ use TestingAccessWrapper;
 class MonologSpiTest extends MediaWikiTestCase {
 
        /**
-        * @covers MonologSpi::mergeConfig
+        * @covers MediaWiki\Logger\MonologSpi::mergeConfig
         */
        public function testMergeConfig() {
                $base = [
index be23c4a..f33cf7e 100644 (file)
@@ -36,7 +36,7 @@ class LineFormatterTest extends MediaWikiTestCase {
        }
 
        /**
-        * @covers LineFormatter::normalizeException
+        * @covers MediaWiki\Logger\Monolog\LineFormatter::normalizeException
         */
        public function testNormalizeExceptionNoTrace() {
                $fixture = new LineFormatter();
@@ -55,7 +55,7 @@ class LineFormatterTest extends MediaWikiTestCase {
        }
 
        /**
-        * @covers LineFormatter::normalizeException
+        * @covers MediaWiki\Logger\Monolog\LineFormatter::normalizeException
         */
        public function testNormalizeExceptionTrace() {
                $fixture = new LineFormatter();
index 4f47f32..95ffb70 100644 (file)
@@ -27,17 +27,17 @@ class SwiftFileBackendTest extends MediaWikiTestCase {
        }
 
        /**
-        * @dataProvider provider_testSanitzeHdrs
-        * @covers SwiftFileBackend::sanitzeHdrs
+        * @dataProvider provider_testSanitizeHdrs
+        * @covers SwiftFileBackend::sanitizeHdrs
         * @covers SwiftFileBackend::getCustomHeaders
         */
-       public function testSanitzeHdrs( $raw, $sanitized ) {
+       public function testSanitizeHdrs( $raw, $sanitized ) {
                $hdrs = $this->backend->sanitizeHdrs( [ 'headers' => $raw ] );
 
                $this->assertEquals( $hdrs, $sanitized, 'sanitizeHdrs() has expected result' );
        }
 
-       public static function provider_testSanitzeHdrs() {
+       public static function provider_testSanitizeHdrs() {
                return [
                        [
                                [
index a579f3a..9c189d1 100644 (file)
@@ -94,7 +94,7 @@ class ProcessCacheLRUTest extends PHPUnit_Framework_TestCase {
        /**
         * @covers ProcessCacheLRU::get
         * @covers ProcessCacheLRU::set
-        * @covers ProcessCacheLRU::het
+        * @covers ProcessCacheLRU::has
         */
        public function testAddAndGetAKey() {
                $oneCache = new ProcessCacheLRUTestable( 1 );
@@ -184,7 +184,7 @@ class ProcessCacheLRUTest extends PHPUnit_Framework_TestCase {
        /**
         * @covers ProcessCacheLRU::get
         * @covers ProcessCacheLRU::set
-        * @covers ProcessCacheLRU::het
+        * @covers ProcessCacheLRU::has
         */
        public function testRecentlyAccessedKeyStickIn() {
                $cache = new ProcessCacheLRUTestable( 2 );
index b777ed0..f70b42d 100644 (file)
@@ -146,7 +146,7 @@ class ExifBitmapTest extends MediaWikiMediaTestCase {
 
        /**
         * @dataProvider provideSwappingICCProfile
-        * @covers BitmapHandler::swapICCProfile
+        * @covers ExifBitmapHandler::swapICCProfile
         */
        public function testSwappingICCProfile(
                $sourceFilename, $controlFilename, $newProfileFilename, $oldProfileName
index dacef8d..bffe415 100644 (file)
@@ -175,7 +175,7 @@ class XMPTest extends MediaWikiTestCase {
 
        /**
         * Test for multi-section, hostile XML
-        * @covers checkParseSafety
+        * @covers XMPReader::checkParseSafety
         */
        public function testCheckParseSafety() {
 
index ae069ea..a96a296 100644 (file)
@@ -41,16 +41,6 @@ class ArticleTest extends MediaWikiTestCase {
                $this->assertEquals( 2, $this->article->mLatest, "Article __set magic" );
        }
 
-       /**
-        * @depends testImplementsSetMagic
-        * @covers Article::__call
-        */
-       public function testImplementsCallMagic() {
-               $this->article->mLatest = 33;
-               $this->article->mDataLoaded = true;
-               $this->assertEquals( 33, $this->article->getLatest(), "Article __call magic" );
-       }
-
        /**
         * @covers Article::__get
         * @covers Article::__set
index 35aca48..27c0c60 100644 (file)
@@ -130,7 +130,7 @@ class ExtensionProcessorTest extends MediaWikiTestCase {
                $this->assertEquals( 'somevalue', $extracted['globals']['egBar'] );
        }
 
-       public static function provideExtracttExtensionMessagesFiles() {
+       public static function provideExtractExtensionMessagesFiles() {
                $dir = __DIR__ . '/FooBar/';
                return [
                        [
@@ -155,10 +155,10 @@ class ExtensionProcessorTest extends MediaWikiTestCase {
        }
 
        /**
-        * @covers ExtensionProcessor::extracttExtensionMessagesFiles
-        * @dataProvider provideExtracttExtensionMessagesFiles
+        * @covers ExtensionProcessor::extractExtensionMessagesFiles
+        * @dataProvider provideExtractExtensionMessagesFiles
         */
-       public function testExtracttExtensionMessagesFiles( $input, $expected ) {
+       public function testExtractExtensionMessagesFiles( $input, $expected ) {
                $processor = new ExtensionProcessor();
                $processor->extractInfo( $this->dir, $input + self::$default, 1 );
                $out = $processor->getExtractedInfo();
index db18b72..2de4bff 100644 (file)
@@ -18,7 +18,7 @@ class FileContentsHasherTest extends MediaWikiTestCase {
        }
 
        /**
-        * @covers FileContentsHasher::getFileContentHash
+        * @covers FileContentsHasher::getFileContentsHash
         * @covers FileContentsHasher::getFileContentsHashInternal
         * @dataProvider provideSingleFile
         */
@@ -33,7 +33,7 @@ class FileContentsHasherTest extends MediaWikiTestCase {
        }
 
        /**
-        * @covers FileContentsHasher::getFileContentHash
+        * @covers FileContentsHasher::getFileContentsHash
         * @covers FileContentsHasher::getFileContentsHashInternal
         * @dataProvider provideMultipleFiles
         */