diff options
author | Reedy <reedy@wikimedia.org> | 2024-02-16 18:04:47 +0000 |
---|---|---|
committer | Jforrester <jforrester@wikimedia.org> | 2024-02-16 22:43:56 +0000 |
commit | 85396a9c99230d706cbbe21466770856b1fbe922 (patch) | |
tree | 3c71838f4b417f7eca33855dfa99ca4a0ebafa4d /tests/phpunit/includes/parser/ParserCacheTest.php | |
parent | 0c60b7f43520dced14c49a72ff28fd0ac5f0399a (diff) | |
download | mediawikicore-85396a9c99230d706cbbe21466770856b1fbe922.tar.gz mediawikicore-85396a9c99230d706cbbe21466770856b1fbe922.zip |
tests: Fix @covers and @coversDefaultClass to have leading \
Change-Id: I5629f91387f2ac453ee4341bfe4bba310bd52f03
Diffstat (limited to 'tests/phpunit/includes/parser/ParserCacheTest.php')
-rw-r--r-- | tests/phpunit/includes/parser/ParserCacheTest.php | 86 |
1 files changed, 43 insertions, 43 deletions
diff --git a/tests/phpunit/includes/parser/ParserCacheTest.php b/tests/phpunit/includes/parser/ParserCacheTest.php index 74a99027aabf..b5939052f48e 100644 --- a/tests/phpunit/includes/parser/ParserCacheTest.php +++ b/tests/phpunit/includes/parser/ParserCacheTest.php @@ -32,7 +32,7 @@ use Wikimedia\UUID\GlobalIdGenerator; use WikiPage; /** - * @covers ParserCache + * @covers \ParserCache * @package MediaWiki\Tests\Parser */ class ParserCacheTest extends MediaWikiIntegrationTestCase { @@ -136,7 +136,7 @@ class ParserCacheTest extends MediaWikiIntegrationTestCase { } /** - * @covers ParserCache::getMetadata + * @covers \ParserCache::getMetadata */ public function testGetMetadataMissing() { $cache = $this->createParserCache(); @@ -145,7 +145,7 @@ class ParserCacheTest extends MediaWikiIntegrationTestCase { } /** - * @covers ParserCache::getMetadata + * @covers \ParserCache::getMetadata */ public function testGetMetadataAllGood() { $cache = $this->createParserCache(); @@ -162,7 +162,7 @@ class ParserCacheTest extends MediaWikiIntegrationTestCase { } /** - * @covers ParserCache::getMetadata + * @covers \ParserCache::getMetadata */ public function testGetMetadataExpired() { $cache = $this->createParserCache(); @@ -180,7 +180,7 @@ class ParserCacheTest extends MediaWikiIntegrationTestCase { } /** - * @covers ParserCache::getMetadata + * @covers \ParserCache::getMetadata */ public function testGetMetadataOutdated() { $cache = $this->createParserCache(); @@ -198,7 +198,7 @@ class ParserCacheTest extends MediaWikiIntegrationTestCase { } /** - * @covers ParserCache::makeParserOutputKey + * @covers \ParserCache::makeParserOutputKey */ public function testMakeParserOutputKey() { $cache = $this->createParserCache(); @@ -217,7 +217,7 @@ class ParserCacheTest extends MediaWikiIntegrationTestCase { /* * Test that fetching without storing first returns false. - * @covers ParserCache::get + * @covers \ParserCache::get */ public function testGetEmpty() { $cache = $this->createParserCache(); @@ -228,8 +228,8 @@ class ParserCacheTest extends MediaWikiIntegrationTestCase { /** * Test that fetching with the same options return the saved value. - * @covers ParserCache::get - * @covers ParserCache::save + * @covers \ParserCache::get + * @covers \ParserCache::save */ public function testSaveGetSameOptions() { $cache = $this->createParserCache(); @@ -249,8 +249,8 @@ class ParserCacheTest extends MediaWikiIntegrationTestCase { /** * Test that fetching with different unused option returns a value. - * @covers ParserCache::get - * @covers ParserCache::save + * @covers \ParserCache::get + * @covers \ParserCache::save */ public function testSaveGetDifferentUnusedOption() { $cache = $this->createParserCache(); @@ -273,8 +273,8 @@ class ParserCacheTest extends MediaWikiIntegrationTestCase { /** * Test that non-cacheable output is not stored - * @covers ParserCache::save - * @covers ParserCache::get + * @covers \ParserCache::save + * @covers \ParserCache::get */ public function testDoesNotStoreNonCacheable() { $cache = $this->createParserCache(); @@ -291,8 +291,8 @@ class ParserCacheTest extends MediaWikiIntegrationTestCase { /** * Test that ParserCacheFilter can be used to prevent content from being cached - * @covers ParserCache::save - * @covers ParserCache::get + * @covers \ParserCache::save + * @covers \ParserCache::get */ public function testDoesNotStoreFiltered() { $cache = $this->createParserCache(); @@ -315,7 +315,7 @@ class ParserCacheTest extends MediaWikiIntegrationTestCase { /** * Test that ParserOptions::isSafeToCache is respected on save - * @covers ParserCache::save + * @covers \ParserCache::save */ public function testDoesNotStoreNotSafeToCacheAndUsed() { $cache = $this->createParserCache(); @@ -334,7 +334,7 @@ class ParserCacheTest extends MediaWikiIntegrationTestCase { /** * Test that ParserOptions::isSafeToCache is respected on get - * @covers ParserCache::get + * @covers \ParserCache::get */ public function testDoesNotGetNotSafeToCache() { $cache = $this->createParserCache(); @@ -353,8 +353,8 @@ class ParserCacheTest extends MediaWikiIntegrationTestCase { /** * Test that ParserOptions::isSafeToCache is respected on save - * @covers ParserCache::save - * @covers ParserCache::get + * @covers \ParserCache::save + * @covers \ParserCache::get */ public function testStoresNotSafeToCacheAndUnused() { $cache = $this->createParserCache(); @@ -369,8 +369,8 @@ class ParserCacheTest extends MediaWikiIntegrationTestCase { /** * Test that fetching with different used option don't return a value. - * @covers ParserCache::get - * @covers ParserCache::save + * @covers \ParserCache::get + * @covers \ParserCache::save */ public function testSaveGetDifferentUsedOption() { $cache = $this->createParserCache(); @@ -389,8 +389,8 @@ class ParserCacheTest extends MediaWikiIntegrationTestCase { /** * Test that output with expired metadata can be retrieved with getDirty - * @covers ParserCache::getDirty - * @covers ParserCache::get + * @covers \ParserCache::getDirty + * @covers \ParserCache::get */ public function testGetExpiredMetadata() { $cache = $this->createParserCache(); @@ -410,8 +410,8 @@ class ParserCacheTest extends MediaWikiIntegrationTestCase { /** * Test that expired output with not expired metadata can be retrieved with getDirty - * @covers ParserCache::getDirty - * @covers ParserCache::get + * @covers \ParserCache::getDirty + * @covers \ParserCache::get */ public function testGetExpiredContent() { $cache = $this->createParserCache(); @@ -441,8 +441,8 @@ class ParserCacheTest extends MediaWikiIntegrationTestCase { /** * Test that output with outdated metadata can be retrieved with getDirty - * @covers ParserCache::getDirty - * @covers ParserCache::get + * @covers \ParserCache::getDirty + * @covers \ParserCache::get */ public function testGetOutdatedMetadata() { $cache = $this->createParserCache(); @@ -463,8 +463,8 @@ class ParserCacheTest extends MediaWikiIntegrationTestCase { /** * Test that outdated output with good metadata can be retrieved with getDirty - * @covers ParserCache::getDirty - * @covers ParserCache::get + * @covers \ParserCache::getDirty + * @covers \ParserCache::get */ public function testGetOutdatedContent() { $cache = $this->createParserCache(); @@ -492,7 +492,7 @@ class ParserCacheTest extends MediaWikiIntegrationTestCase { /** * Test that fetching after deleting a key returns false. - * @covers ParserCache::deleteOptionsKey + * @covers \ParserCache::deleteOptionsKey */ public function testDeleteOptionsKey() { $cache = $this->createParserCache(); @@ -509,7 +509,7 @@ class ParserCacheTest extends MediaWikiIntegrationTestCase { /** * Test that RejectParserCacheValue hook can reject ParserOutput - * @covers ParserCache::get + * @covers \ParserCache::get */ public function testRejectedByHook() { $parserOutput = new ParserOutput( 'TEST_TEXT' ); @@ -539,7 +539,7 @@ class ParserCacheTest extends MediaWikiIntegrationTestCase { /** * Test that ParserCacheSaveComplete hook is run - * @covers ParserCache::save + * @covers \ParserCache::save */ public function testParserCacheSaveCompleteHook() { $parserOutput = new ParserOutput( 'TEST_TEXT' ); @@ -562,7 +562,7 @@ class ParserCacheTest extends MediaWikiIntegrationTestCase { /** * Tests that parser cache respects skipped if page does not exist - * @covers ParserCache::get + * @covers \ParserCache::get */ public function testSkipIfNotExist() { $mockPage = $this->createNoOpMock( PageRecord::class, [ 'exists', 'assertWiki' ] ); @@ -579,7 +579,7 @@ class ParserCacheTest extends MediaWikiIntegrationTestCase { /** * Tests that parser cache respects skipped if page is redirect - * @covers ParserCache::get + * @covers \ParserCache::get */ public function testSkipIfRedirect() { $cache = $this->createParserCache(); @@ -591,7 +591,7 @@ class ParserCacheTest extends MediaWikiIntegrationTestCase { /** * Tests that getCacheStorage returns underlying BagOStuff - * @covers ParserCache::getCacheStorage + * @covers \ParserCache::getCacheStorage */ public function testGetCacheStorage() { $storage = new EmptyBagOStuff(); @@ -600,7 +600,7 @@ class ParserCacheTest extends MediaWikiIntegrationTestCase { } /** - * @covers ParserCache::save + * @covers \ParserCache::save */ public function testSaveNoText() { $this->expectException( InvalidArgumentException::class ); @@ -626,8 +626,8 @@ class ParserCacheTest extends MediaWikiIntegrationTestCase { * back to a version of the code that doesn't know about JSON. * * @dataProvider provideCorruptData - * @covers ParserCache::get - * @covers ParserCache::restoreFromJson + * @covers \ParserCache::get + * @covers \ParserCache::restoreFromJson * @param string $data */ public function testCorruptData( string $data ) { @@ -655,7 +655,7 @@ class ParserCacheTest extends MediaWikiIntegrationTestCase { * We want to be sure that we don't crash horribly if we have to roll * back to a version of the code that doesn't know about JSON. * - * @covers ParserCache::getMetadata + * @covers \ParserCache::getMetadata */ public function testCorruptMetadata() { $cacheStorage = new HashBagOStuff(); @@ -682,7 +682,7 @@ class ParserCacheTest extends MediaWikiIntegrationTestCase { * Test what happens when upgrading from 1.35 or earlier, * when old cache entries do not yet use JSON. * - * @covers ParserCache::get + * @covers \ParserCache::get */ public function testMigrationToJson() { $bagOStuff = new HashBagOStuff(); @@ -741,7 +741,7 @@ class ParserCacheTest extends MediaWikiIntegrationTestCase { } /** - * @covers ParserCache::convertForCache + * @covers \ParserCache::convertForCache */ public function testNonSerializableJsonIsReported() { $testLogger = new TestLogger( true ); @@ -757,7 +757,7 @@ class ParserCacheTest extends MediaWikiIntegrationTestCase { } /** - * @covers ParserCache::convertForCache + * @covers \ParserCache::convertForCache */ public function testCyclicStructuresDoNotBlowUpInJson() { $this->markTestSkipped( 'Temporarily disabled: T314338' ); @@ -778,7 +778,7 @@ class ParserCacheTest extends MediaWikiIntegrationTestCase { /** * Tests that unicode characters are not \u escaped * - * @covers ParserCache::convertForCache + * @covers \ParserCache::convertForCache */ public function testJsonEncodeUnicode() { $unicodeCharacter = "Э"; |