diff options
author | James D. Forrester <jforrester@wikimedia.org> | 2024-10-03 14:39:06 -0400 |
---|---|---|
committer | Reedy <reedy@wikimedia.org> | 2024-10-15 23:54:32 +0100 |
commit | a5387c7c208b23b848f3c93a84a58ebb14c698cf (patch) | |
tree | a343730570c760f99459a88fb36aaa2cbefcf3eb /tests/phpunit/includes/parser | |
parent | 23ec5ff94eff84bc2661b08cf940ed7f2f771080 (diff) | |
download | mediawikicore-a5387c7c208b23b848f3c93a84a58ebb14c698cf.tar.gz mediawikicore-a5387c7c208b23b848f3c93a84a58ebb14c698cf.zip |
Namespace all remaining classes in includes/parser
Bug: T353458
Change-Id: If02cc9b1ff78e26c1cf8c91ee4695845eb133829
Diffstat (limited to 'tests/phpunit/includes/parser')
17 files changed, 76 insertions, 76 deletions
diff --git a/tests/phpunit/includes/parser/BeforeParserFetchTemplateRevisionRecordTest.php b/tests/phpunit/includes/parser/BeforeParserFetchTemplateRevisionRecordTest.php index 3823ac2ae252..9185b61002dd 100644 --- a/tests/phpunit/includes/parser/BeforeParserFetchTemplateRevisionRecordTest.php +++ b/tests/phpunit/includes/parser/BeforeParserFetchTemplateRevisionRecordTest.php @@ -5,12 +5,12 @@ namespace MediaWiki\Tests\Parser; use MediaWiki\Content\WikitextContent; use MediaWiki\Linker\LinkTarget; use MediaWiki\Parser\Parser; +use MediaWiki\Parser\ParserOptions; use MediaWiki\Revision\MutableRevisionRecord; use MediaWiki\Revision\RevisionRecord; use MediaWiki\Revision\SlotRecord; use MediaWikiLangTestCase; use MockTitleTrait; -use ParserOptions; /** * @group Database diff --git a/tests/phpunit/includes/parser/CacheTimeTest.php b/tests/phpunit/includes/parser/CacheTimeTest.php index a54a03ca752f..fd782611442a 100644 --- a/tests/phpunit/includes/parser/CacheTimeTest.php +++ b/tests/phpunit/includes/parser/CacheTimeTest.php @@ -2,15 +2,15 @@ namespace MediaWiki\Tests\Parser; -use CacheTime; use MediaWiki\MainConfigNames; +use MediaWiki\Parser\CacheTime; +use MediaWiki\Parser\ParserOptions; use MediaWiki\Utils\MWTimestamp; use MediaWikiIntegrationTestCase; -use ParserOptions; use Wikimedia\Tests\SerializationTestTrait; /** - * @covers \CacheTime + * @covers \MediaWiki\Parser\CacheTime */ class CacheTimeTest extends MediaWikiIntegrationTestCase { use SerializationTestTrait; diff --git a/tests/phpunit/includes/parser/CoreParserFunctionsTest.php b/tests/phpunit/includes/parser/CoreParserFunctionsTest.php index 38215fac7c09..0338d4432104 100644 --- a/tests/phpunit/includes/parser/CoreParserFunctionsTest.php +++ b/tests/phpunit/includes/parser/CoreParserFunctionsTest.php @@ -2,14 +2,14 @@ namespace MediaWiki\Tests\Parser; -use CoreParserFunctions; use MediaWiki\Language\RawMessage; +use MediaWiki\Parser\CoreParserFunctions; use MediaWiki\User\User; use MediaWikiLangTestCase; /** * @group Database - * @covers \CoreParserFunctions + * @covers \MediaWiki\Parser\CoreParserFunctions */ class CoreParserFunctionsTest extends MediaWikiLangTestCase { diff --git a/tests/phpunit/includes/parser/ExtraParserTest.php b/tests/phpunit/includes/parser/ExtraParserTest.php index c6ad8220abf1..7817744c27f0 100644 --- a/tests/phpunit/includes/parser/ExtraParserTest.php +++ b/tests/phpunit/includes/parser/ExtraParserTest.php @@ -6,11 +6,11 @@ use MediaWiki\Context\RequestContext; use MediaWiki\Interwiki\ClassicInterwikiLookup; use MediaWiki\MainConfigNames; use MediaWiki\Parser\Parser; +use MediaWiki\Parser\ParserOptions; use MediaWiki\SpecialPage\SpecialPage; use MediaWiki\Title\Title; use MediaWiki\User\User; use MediaWikiIntegrationTestCase; -use ParserOptions; use Wikimedia\TestingAccessWrapper; /** diff --git a/tests/phpunit/includes/parser/LinkHolderArrayIntegrationTest.php b/tests/phpunit/includes/parser/LinkHolderArrayIntegrationTest.php index 5da2ce1807b0..6500a3bfcde3 100644 --- a/tests/phpunit/includes/parser/LinkHolderArrayIntegrationTest.php +++ b/tests/phpunit/includes/parser/LinkHolderArrayIntegrationTest.php @@ -4,22 +4,22 @@ declare( strict_types = 1 ); namespace MediaWiki\Tests\Parser; -use LinkHolderArray; use MediaWiki\Language\ILanguageConverter; use MediaWiki\MainConfigNames; +use MediaWiki\Parser\LinkHolderArray; use MediaWiki\Parser\Parser; use MediaWiki\Title\Title; use MediaWikiLangTestCase; use Wikimedia\TestingAccessWrapper; /** - * @covers \LinkHolderArray + * @covers \MediaWiki\Parser\LinkHolderArray */ class LinkHolderArrayIntegrationTest extends MediaWikiLangTestCase { /** * @dataProvider provideIsBig - * @covers \LinkHolderArray::isBig + * @covers \MediaWiki\Parser\LinkHolderArray::isBig * * @param int $size * @param int $global @@ -48,7 +48,7 @@ class LinkHolderArrayIntegrationTest extends MediaWikiLangTestCase { /** * @dataProvider provideMakeHolder_withNsText - * @covers \LinkHolderArray::makeHolder + * @covers \MediaWiki\Parser\LinkHolderArray::makeHolder * * @param bool $isExternal * @param string $expected diff --git a/tests/phpunit/includes/parser/MagicVariableTest.php b/tests/phpunit/includes/parser/MagicVariableTest.php index d12bad4b45e7..afe7e306ec5d 100644 --- a/tests/phpunit/includes/parser/MagicVariableTest.php +++ b/tests/phpunit/includes/parser/MagicVariableTest.php @@ -16,10 +16,10 @@ namespace MediaWiki\Tests\Parser; use MediaWiki\MainConfigNames; use MediaWiki\Parser\Parser; +use MediaWiki\Parser\ParserOptions; use MediaWiki\Title\Title; use MediaWiki\User\User; use MediaWikiIntegrationTestCase; -use ParserOptions; use Wikimedia\TestingAccessWrapper; /** diff --git a/tests/phpunit/includes/parser/ParserCacheSerializationTestCases.php b/tests/phpunit/includes/parser/ParserCacheSerializationTestCases.php index b536138d977c..81674bc1c42e 100644 --- a/tests/phpunit/includes/parser/ParserCacheSerializationTestCases.php +++ b/tests/phpunit/includes/parser/ParserCacheSerializationTestCases.php @@ -2,10 +2,10 @@ namespace MediaWiki\Tests\Parser; -use CacheTime; use JsonSerializable; use MediaWiki\Debug\MWDebug; use MediaWiki\Json\JsonCodec; +use MediaWiki\Parser\CacheTime; use MediaWiki\Parser\ParserOutput; use MediaWiki\Tests\Json\JsonDeserializableSubClass; use MediaWiki\Title\Title; diff --git a/tests/phpunit/includes/parser/ParserCacheTest.php b/tests/phpunit/includes/parser/ParserCacheTest.php index 12e22bcd9b41..ec24cdd66fb9 100644 --- a/tests/phpunit/includes/parser/ParserCacheTest.php +++ b/tests/phpunit/includes/parser/ParserCacheTest.php @@ -2,14 +2,16 @@ namespace MediaWiki\Tests\Parser; -use CacheTime; use InvalidArgumentException; use MediaWiki\HookContainer\HookContainer; use MediaWiki\Json\JsonCodec; use MediaWiki\Page\PageRecord; use MediaWiki\Page\PageStoreRecord; use MediaWiki\Page\WikiPageFactory; +use MediaWiki\Parser\CacheTime; +use MediaWiki\Parser\ParserCache; use MediaWiki\Parser\ParserCacheFilter; +use MediaWiki\Parser\ParserOptions; use MediaWiki\Parser\ParserOutput; use MediaWiki\Tests\Json\JsonDeserializableSuperClass; use MediaWiki\Title\Title; @@ -17,8 +19,6 @@ use MediaWiki\Title\TitleFactory; use MediaWiki\User\User; use MediaWiki\Utils\MWTimestamp; use MediaWikiIntegrationTestCase; -use ParserCache; -use ParserOptions; use Psr\Log\LoggerInterface; use Psr\Log\LogLevel; use Psr\Log\NullLogger; @@ -32,7 +32,7 @@ use Wikimedia\UUID\GlobalIdGenerator; use WikiPage; /** - * @covers \ParserCache + * @covers \MediaWiki\Parser\ParserCache */ class ParserCacheTest extends MediaWikiIntegrationTestCase { @@ -135,7 +135,7 @@ class ParserCacheTest extends MediaWikiIntegrationTestCase { } /** - * @covers \ParserCache::getMetadata + * @covers \MediaWiki\Parser\ParserCache::getMetadata */ public function testGetMetadataMissing() { $cache = $this->createParserCache(); @@ -144,7 +144,7 @@ class ParserCacheTest extends MediaWikiIntegrationTestCase { } /** - * @covers \ParserCache::getMetadata + * @covers \MediaWiki\Parser\ParserCache::getMetadata */ public function testGetMetadataAllGood() { $cache = $this->createParserCache(); @@ -161,7 +161,7 @@ class ParserCacheTest extends MediaWikiIntegrationTestCase { } /** - * @covers \ParserCache::getMetadata + * @covers \MediaWiki\Parser\ParserCache::getMetadata */ public function testGetMetadataExpired() { $cache = $this->createParserCache(); @@ -179,7 +179,7 @@ class ParserCacheTest extends MediaWikiIntegrationTestCase { } /** - * @covers \ParserCache::getMetadata + * @covers \MediaWiki\Parser\ParserCache::getMetadata */ public function testGetMetadataOutdated() { $cache = $this->createParserCache(); @@ -197,7 +197,7 @@ class ParserCacheTest extends MediaWikiIntegrationTestCase { } /** - * @covers \ParserCache::makeParserOutputKey + * @covers \MediaWiki\Parser\ParserCache::makeParserOutputKey */ public function testMakeParserOutputKey() { $cache = $this->createParserCache(); @@ -227,8 +227,8 @@ class ParserCacheTest extends MediaWikiIntegrationTestCase { /** * Test that fetching with the same options return the saved value. - * @covers \ParserCache::get - * @covers \ParserCache::save + * @covers \MediaWiki\Parser\ParserCache::get + * @covers \MediaWiki\Parser\ParserCache::save */ public function testSaveGetSameOptions() { $cache = $this->createParserCache(); @@ -248,8 +248,8 @@ class ParserCacheTest extends MediaWikiIntegrationTestCase { /** * Test that fetching with different unused option returns a value. - * @covers \ParserCache::get - * @covers \ParserCache::save + * @covers \MediaWiki\Parser\ParserCache::get + * @covers \MediaWiki\Parser\ParserCache::save */ public function testSaveGetDifferentUnusedOption() { $cache = $this->createParserCache(); @@ -272,8 +272,8 @@ class ParserCacheTest extends MediaWikiIntegrationTestCase { /** * Test that non-cacheable output is not stored - * @covers \ParserCache::save - * @covers \ParserCache::get + * @covers \MediaWiki\Parser\ParserCache::save + * @covers \MediaWiki\Parser\ParserCache::get */ public function testDoesNotStoreNonCacheable() { $cache = $this->createParserCache(); @@ -290,8 +290,8 @@ class ParserCacheTest extends MediaWikiIntegrationTestCase { /** * Test that ParserCacheFilter can be used to prevent content from being cached - * @covers \ParserCache::save - * @covers \ParserCache::get + * @covers \MediaWiki\Parser\ParserCache::save + * @covers \MediaWiki\Parser\ParserCache::get */ public function testDoesNotStoreFiltered() { $cache = $this->createParserCache(); @@ -314,7 +314,7 @@ class ParserCacheTest extends MediaWikiIntegrationTestCase { /** * Test that ParserOptions::isSafeToCache is respected on save - * @covers \ParserCache::save + * @covers \MediaWiki\Parser\ParserCache::save */ public function testDoesNotStoreNotSafeToCacheAndUsed() { $cache = $this->createParserCache(); @@ -333,7 +333,7 @@ class ParserCacheTest extends MediaWikiIntegrationTestCase { /** * Test that ParserOptions::isSafeToCache is respected on get - * @covers \ParserCache::get + * @covers \MediaWiki\Parser\ParserCache::get */ public function testDoesNotGetNotSafeToCache() { $cache = $this->createParserCache(); @@ -352,8 +352,8 @@ class ParserCacheTest extends MediaWikiIntegrationTestCase { /** * Test that ParserOptions::isSafeToCache is respected on save - * @covers \ParserCache::save - * @covers \ParserCache::get + * @covers \MediaWiki\Parser\ParserCache::save + * @covers \MediaWiki\Parser\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 \MediaWiki\Parser\ParserCache::get + * @covers \MediaWiki\Parser\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 \MediaWiki\Parser\ParserCache::getDirty + * @covers \MediaWiki\Parser\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 \MediaWiki\Parser\ParserCache::getDirty + * @covers \MediaWiki\Parser\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 \MediaWiki\Parser\ParserCache::getDirty + * @covers \MediaWiki\Parser\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 \MediaWiki\Parser\ParserCache::getDirty + * @covers \MediaWiki\Parser\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 \MediaWiki\Parser\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 \MediaWiki\Parser\ParserCache::get */ public function testRejectedByHook() { $parserOutput = new ParserOutput( 'TEST_TEXT' ); @@ -541,7 +541,7 @@ class ParserCacheTest extends MediaWikiIntegrationTestCase { /** * Test that ParserCacheSaveComplete hook is run - * @covers \ParserCache::save + * @covers \MediaWiki\Parser\ParserCache::save */ public function testParserCacheSaveCompleteHook() { $parserOutput = new ParserOutput( 'TEST_TEXT' ); @@ -564,7 +564,7 @@ class ParserCacheTest extends MediaWikiIntegrationTestCase { /** * Tests that parser cache respects skipped if page does not exist - * @covers \ParserCache::get + * @covers \MediaWiki\Parser\ParserCache::get */ public function testSkipIfNotExist() { $mockPage = $this->createNoOpMock( PageRecord::class, [ 'exists', 'assertWiki' ] ); @@ -581,7 +581,7 @@ class ParserCacheTest extends MediaWikiIntegrationTestCase { /** * Tests that parser cache respects skipped if page is redirect - * @covers \ParserCache::get + * @covers \MediaWiki\Parser\ParserCache::get */ public function testSkipIfRedirect() { $cache = $this->createParserCache(); @@ -593,7 +593,7 @@ class ParserCacheTest extends MediaWikiIntegrationTestCase { /** * Tests that getCacheStorage returns underlying BagOStuff - * @covers \ParserCache::getCacheStorage + * @covers \MediaWiki\Parser\ParserCache::getCacheStorage */ public function testGetCacheStorage() { $storage = new EmptyBagOStuff(); @@ -602,7 +602,7 @@ class ParserCacheTest extends MediaWikiIntegrationTestCase { } /** - * @covers \ParserCache::save + * @covers \MediaWiki\Parser\ParserCache::save */ public function testSaveNoText() { $this->expectException( InvalidArgumentException::class ); @@ -628,8 +628,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 \MediaWiki\Parser\ParserCache::get + * @covers \MediaWiki\Parser\ParserCache::restoreFromJson * @param string $data */ public function testCorruptData( string $data ) { @@ -657,7 +657,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 \MediaWiki\Parser\ParserCache::getMetadata */ public function testCorruptMetadata() { $cacheStorage = new HashBagOStuff(); @@ -684,7 +684,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 \MediaWiki\Parser\ParserCache::get */ public function testMigrationToJson() { $bagOStuff = new HashBagOStuff(); @@ -745,7 +745,7 @@ class ParserCacheTest extends MediaWikiIntegrationTestCase { } /** - * @covers \ParserCache::convertForCache + * @covers \MediaWiki\Parser\ParserCache::convertForCache */ public function testNonSerializableJsonIsReported() { $testLogger = new TestLogger( true ); @@ -761,7 +761,7 @@ class ParserCacheTest extends MediaWikiIntegrationTestCase { } /** - * @covers \ParserCache::convertForCache + * @covers \MediaWiki\Parser\ParserCache::convertForCache */ public function testCyclicStructuresDoNotBlowUpInJson() { $this->markTestSkipped( 'Temporarily disabled: T314338' ); @@ -782,7 +782,7 @@ class ParserCacheTest extends MediaWikiIntegrationTestCase { /** * Tests that unicode characters are not \u escaped * - * @covers \ParserCache::convertForCache + * @covers \MediaWiki\Parser\ParserCache::convertForCache */ public function testJsonEncodeUnicode() { $unicodeCharacter = "Э"; diff --git a/tests/phpunit/includes/parser/ParserMethodsTest.php b/tests/phpunit/includes/parser/ParserMethodsTest.php index 1448baf32579..627372436883 100644 --- a/tests/phpunit/includes/parser/ParserMethodsTest.php +++ b/tests/phpunit/includes/parser/ParserMethodsTest.php @@ -9,6 +9,7 @@ use MediaWiki\Language\RawMessage; use MediaWiki\MainConfigNames; use MediaWiki\MediaWikiServices; use MediaWiki\Parser\Parser; +use MediaWiki\Parser\ParserOptions; use MediaWiki\Revision\MutableRevisionRecord; use MediaWiki\Revision\RevisionStore; use MediaWiki\Revision\SlotRecord; @@ -17,7 +18,6 @@ use MediaWiki\User\User; use MediaWiki\User\UserIdentityValue; use MediaWikiLangTestCase; use MockTitleTrait; -use ParserOptions; /** * @group Database diff --git a/tests/phpunit/includes/parser/ParserOptionsTest.php b/tests/phpunit/includes/parser/ParserOptionsTest.php index 52b103936721..583a2594e6d5 100644 --- a/tests/phpunit/includes/parser/ParserOptionsTest.php +++ b/tests/phpunit/includes/parser/ParserOptionsTest.php @@ -9,6 +9,7 @@ use MediaWiki\Context\IContextSource; use MediaWiki\Context\RequestContext; use MediaWiki\HookContainer\HookContainer; use MediaWiki\MainConfigNames; +use MediaWiki\Parser\ParserOptions; use MediaWiki\Request\FauxRequest; use MediaWiki\Revision\SlotRecord; use MediaWiki\Tests\User\TempUser\TempUserTestTrait; @@ -17,12 +18,11 @@ use MediaWiki\User\User; use MediaWiki\User\UserIdentity; use MediaWiki\User\UserIdentityValue; use MediaWikiLangTestCase; -use ParserOptions; use stdClass; use Wikimedia\ScopedCallback; /** - * @covers \ParserOptions + * @covers \MediaWiki\Parser\ParserOptions * @group Database */ class ParserOptionsTest extends MediaWikiLangTestCase { diff --git a/tests/phpunit/includes/parser/ParserOutputTest.php b/tests/phpunit/includes/parser/ParserOutputTest.php index 11866d2bb7ee..e5de2b5186c4 100644 --- a/tests/phpunit/includes/parser/ParserOutputTest.php +++ b/tests/phpunit/includes/parser/ParserOutputTest.php @@ -7,6 +7,7 @@ use MediaWiki\Context\RequestContext; use MediaWiki\Debug\MWDebug; use MediaWiki\MainConfigNames; use MediaWiki\MediaWikiServices; +use MediaWiki\Parser\ParserOptions; use MediaWiki\Parser\ParserOutput; use MediaWiki\Parser\ParserOutputFlags; use MediaWiki\Parser\ParserOutputStringSets; @@ -14,7 +15,6 @@ use MediaWiki\Title\Title; use MediaWiki\Title\TitleValue; use MediaWiki\Utils\MWTimestamp; use MediaWikiLangTestCase; -use ParserOptions; use Wikimedia\Bcp47Code\Bcp47CodeValue; use Wikimedia\Parsoid\Core\SectionMetadata; use Wikimedia\Parsoid\Core\TOCData; @@ -23,7 +23,7 @@ use Wikimedia\Tests\SerializationTestTrait; /** * @covers \MediaWiki\Parser\ParserOutput - * @covers \CacheTime + * @covers \Mediawiki\Parser\CacheTime * @group Database * ^--- trigger DB shadowing because we are using Title magic */ @@ -989,7 +989,7 @@ EOF } public function provideMergeInternalMetaDataFrom() { - MWDebug::filterDeprecationForTest( '/^CacheTime::setCacheTime called with -1 as an argument/' ); + $this->filterDeprecated( '/^.*CacheTime::setCacheTime called with -1 as an argument/' ); // flags & co $a = new ParserOutput(); @@ -1174,7 +1174,7 @@ EOF * @param array $expected */ public function testMergeInternalMetaDataFrom( ParserOutput $a, ParserOutput $b, $expected ) { - $this->filterDeprecated( '/^CacheTime::setCacheTime called with -1 as an argument/' ); + $this->filterDeprecated( '/^.*CacheTime::setCacheTime called with -1 as an argument/' ); $a->mergeInternalMetaDataFrom( $b ); $this->assertFieldValues( $a, $expected ); diff --git a/tests/phpunit/includes/parser/ParserPreloadTest.php b/tests/phpunit/includes/parser/ParserPreloadTest.php index ff681ec2f514..12044b4565ea 100644 --- a/tests/phpunit/includes/parser/ParserPreloadTest.php +++ b/tests/phpunit/includes/parser/ParserPreloadTest.php @@ -3,10 +3,10 @@ namespace MediaWiki\Tests\Parser; use MediaWiki\Parser\Parser; +use MediaWiki\Parser\ParserOptions; use MediaWiki\Title\Title; use MediaWiki\User\User; use MediaWikiIntegrationTestCase; -use ParserOptions; /** * Basic tests for Parser::getPreloadText diff --git a/tests/phpunit/includes/parser/ParserTest.php b/tests/phpunit/includes/parser/ParserTest.php index d4f00441cca9..7903bba804a3 100644 --- a/tests/phpunit/includes/parser/ParserTest.php +++ b/tests/phpunit/includes/parser/ParserTest.php @@ -16,6 +16,7 @@ use MediaWiki\Page\PageReferenceValue; use MediaWiki\Parser\MagicWord; use MediaWiki\Parser\MagicWordFactory; use MediaWiki\Parser\Parser; +use MediaWiki\Parser\ParserFactory; use MediaWiki\Preferences\SignatureValidatorFactory; use MediaWiki\SpecialPage\SpecialPageFactory; use MediaWiki\Tidy\TidyDriverBase; @@ -27,7 +28,6 @@ use MediaWiki\User\UserFactory; use MediaWiki\User\UserNameUtils; use MediaWiki\Utils\UrlUtils; use MediaWikiIntegrationTestCase; -use ParserFactory; use Psr\Log\NullLogger; use ReflectionObject; use Wikimedia\ObjectCache\WANObjectCache; diff --git a/tests/phpunit/includes/parser/PreprocessorTest.php b/tests/phpunit/includes/parser/PreprocessorTest.php index faae23a59c6c..4b345dde0cab 100644 --- a/tests/phpunit/includes/parser/PreprocessorTest.php +++ b/tests/phpunit/includes/parser/PreprocessorTest.php @@ -3,18 +3,18 @@ namespace MediaWiki\Tests\Parser; use MediaWiki\Parser\Parser; +use MediaWiki\Parser\ParserOptions; +use MediaWiki\Parser\Preprocessor; +use MediaWiki\Parser\Preprocessor_Hash; use MediaWiki\User\User; use MediaWikiIntegrationTestCase; -use ParserOptions; -use Preprocessor; -use Preprocessor_Hash; use Wikimedia\ObjectCache\HashBagOStuff; use Wikimedia\ObjectCache\WANObjectCache; /** - * @covers \Preprocessor + * @covers \MediaWiki\Parser\Preprocessor * - * @covers \Preprocessor_Hash + * @covers \MediaWiki\Parser\Preprocessor_Hash * @covers \PPDStack_Hash * @covers \PPDStackElement_Hash * @covers \PPDPart_Hash diff --git a/tests/phpunit/includes/parser/RevisionOutputCacheTest.php b/tests/phpunit/includes/parser/RevisionOutputCacheTest.php index 35621049e4ff..e34f1cc7afc9 100644 --- a/tests/phpunit/includes/parser/RevisionOutputCacheTest.php +++ b/tests/phpunit/includes/parser/RevisionOutputCacheTest.php @@ -6,6 +6,7 @@ use InvalidArgumentException; use MediaWiki\Json\JsonCodec; use MediaWiki\Page\PageIdentity; use MediaWiki\Page\PageIdentityValue; +use MediaWiki\Parser\ParserOptions; use MediaWiki\Parser\ParserOutput; use MediaWiki\Parser\RevisionOutputCache; use MediaWiki\Revision\MutableRevisionRecord; @@ -14,7 +15,6 @@ use MediaWiki\Tests\Json\JsonDeserializableSuperClass; use MediaWiki\User\User; use MediaWiki\Utils\MWTimestamp; use MediaWikiIntegrationTestCase; -use ParserOptions; use Psr\Log\LoggerInterface; use Psr\Log\LogLevel; use Psr\Log\NullLogger; diff --git a/tests/phpunit/includes/parser/StripStateTest.php b/tests/phpunit/includes/parser/StripStateTest.php index 867655fab3cd..9114ae706e41 100644 --- a/tests/phpunit/includes/parser/StripStateTest.php +++ b/tests/phpunit/includes/parser/StripStateTest.php @@ -3,11 +3,11 @@ namespace MediaWiki\Tests\Parser; use MediaWiki\Parser\Parser; +use MediaWiki\Parser\StripState; use MediaWikiIntegrationTestCase; -use StripState; /** - * @covers \StripState + * @covers \MediaWiki\Parser\StripState */ class StripStateTest extends MediaWikiIntegrationTestCase { protected function setUp(): void { diff --git a/tests/phpunit/includes/parser/TagHooksTest.php b/tests/phpunit/includes/parser/TagHooksTest.php index 329bc1afb024..15f6987b72f3 100644 --- a/tests/phpunit/includes/parser/TagHooksTest.php +++ b/tests/phpunit/includes/parser/TagHooksTest.php @@ -3,10 +3,10 @@ namespace MediaWiki\Tests\Parser; use InvalidArgumentException; +use MediaWiki\Parser\ParserOptions; use MediaWiki\Title\Title; use MediaWiki\User\User; use MediaWikiIntegrationTestCase; -use ParserOptions; /** * @group Database |