From 7c4ceae4e7ef89e718f3e2ee1a88427a4d88f8ca Mon Sep 17 00:00:00 2001 From: Umherirrender Date: Fri, 1 Feb 2019 22:08:32 +0100 Subject: [PATCH] Add missing @covers to backend related tests Change-Id: I6ecbedf7d4f6c48b4f17331c31588f2c8b772054 --- .../includes/debug/logger/monolog/LogstashFormatterTest.php | 4 ++++ .../includes/libs/objectcache/MultiWriteBagOStuffTest.php | 3 +++ tests/phpunit/includes/site/MediaWikiSiteTest.php | 3 +++ 3 files changed, 10 insertions(+) diff --git a/tests/phpunit/includes/debug/logger/monolog/LogstashFormatterTest.php b/tests/phpunit/includes/debug/logger/monolog/LogstashFormatterTest.php index 1ee188e7cd..a1207b26b2 100644 --- a/tests/phpunit/includes/debug/logger/monolog/LogstashFormatterTest.php +++ b/tests/phpunit/includes/debug/logger/monolog/LogstashFormatterTest.php @@ -5,6 +5,7 @@ namespace MediaWiki\Logger\Monolog; class LogstashFormatterTest extends \PHPUnit\Framework\TestCase { /** * @dataProvider provideV1 + * @covers MediaWiki\Logger\Monolog\LogstashFormatter::formatV1 * @param array $record The input record. * @param array $expected Associative array of expected keys and their values. * @param array $notExpected List of keys that should not exist. @@ -42,6 +43,9 @@ class LogstashFormatterTest extends \PHPUnit\Framework\TestCase { ]; } + /** + * @covers MediaWiki\Logger\Monolog\LogstashFormatter::formatV1 + */ public function testV1WithPrefix() { $formatter = new LogstashFormatter( 'app', 'system', null, 'ctx_', LogstashFormatter::V1 ); $record = [ 'extra' => [ 'url' => 1 ], 'context' => [ 'url' => 2 ] ]; diff --git a/tests/phpunit/includes/libs/objectcache/MultiWriteBagOStuffTest.php b/tests/phpunit/includes/libs/objectcache/MultiWriteBagOStuffTest.php index 8a95ae7a16..0376803f41 100644 --- a/tests/phpunit/includes/libs/objectcache/MultiWriteBagOStuffTest.php +++ b/tests/phpunit/includes/libs/objectcache/MultiWriteBagOStuffTest.php @@ -138,6 +138,9 @@ class MultiWriteBagOStuffTest extends MediaWikiTestCase { $this->assertSame( 'special', $cache->makeGlobalKey( 'a', 'b' ) ); } + /** + * @covers MultiWriteBagOStuff::add + */ public function testDuplicateStoreAdd() { $bag = new HashBagOStuff(); $cache = new MultiWriteBagOStuff( [ diff --git a/tests/phpunit/includes/site/MediaWikiSiteTest.php b/tests/phpunit/includes/site/MediaWikiSiteTest.php index b367979946..d198462368 100644 --- a/tests/phpunit/includes/site/MediaWikiSiteTest.php +++ b/tests/phpunit/includes/site/MediaWikiSiteTest.php @@ -30,6 +30,9 @@ */ class MediaWikiSiteTest extends SiteTest { + /** + * @covers MediaWikiSite::normalizePageName + */ public function testNormalizePageTitle() { $this->setMwGlobals( [ 'wgCapitalLinks' => true, -- 2.20.1