aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit
diff options
context:
space:
mode:
authorJames D. Forrester <jforrester@wikimedia.org>2024-10-03 14:39:06 -0400
committerReedy <reedy@wikimedia.org>2024-10-15 23:54:32 +0100
commita5387c7c208b23b848f3c93a84a58ebb14c698cf (patch)
treea343730570c760f99459a88fb36aaa2cbefcf3eb /tests/phpunit
parent23ec5ff94eff84bc2661b08cf940ed7f2f771080 (diff)
downloadmediawikicore-a5387c7c208b23b848f3c93a84a58ebb14c698cf.tar.gz
mediawikicore-a5387c7c208b23b848f3c93a84a58ebb14c698cf.zip
Namespace all remaining classes in includes/parser
Bug: T353458 Change-Id: If02cc9b1ff78e26c1cf8c91ee4695845eb133829
Diffstat (limited to 'tests/phpunit')
-rw-r--r--tests/phpunit/includes/OutputTransform/DummyDOMTransformStage.php2
-rw-r--r--tests/phpunit/includes/OutputTransform/Stages/HandleParsoidSectionLinksTest.php2
-rw-r--r--tests/phpunit/includes/OutputTransform/Stages/HandleSectionLinksTest.php2
-rw-r--r--tests/phpunit/includes/Revision/RenderedRevisionTest.php2
-rw-r--r--tests/phpunit/includes/Revision/RevisionRendererTest.php2
-rw-r--r--tests/phpunit/includes/Storage/DerivedPageDataUpdaterTest.php2
-rw-r--r--tests/phpunit/includes/Storage/PageUpdaterTest.php2
-rw-r--r--tests/phpunit/includes/content/Transform/PreSaveTransformParamsValueTest.php2
-rw-r--r--tests/phpunit/includes/parser/BeforeParserFetchTemplateRevisionRecordTest.php2
-rw-r--r--tests/phpunit/includes/parser/CacheTimeTest.php6
-rw-r--r--tests/phpunit/includes/parser/CoreParserFunctionsTest.php4
-rw-r--r--tests/phpunit/includes/parser/ExtraParserTest.php2
-rw-r--r--tests/phpunit/includes/parser/LinkHolderArrayIntegrationTest.php8
-rw-r--r--tests/phpunit/includes/parser/MagicVariableTest.php2
-rw-r--r--tests/phpunit/includes/parser/ParserCacheSerializationTestCases.php2
-rw-r--r--tests/phpunit/includes/parser/ParserCacheTest.php90
-rw-r--r--tests/phpunit/includes/parser/ParserMethodsTest.php2
-rw-r--r--tests/phpunit/includes/parser/ParserOptionsTest.php4
-rw-r--r--tests/phpunit/includes/parser/ParserOutputTest.php8
-rw-r--r--tests/phpunit/includes/parser/ParserPreloadTest.php2
-rw-r--r--tests/phpunit/includes/parser/ParserTest.php2
-rw-r--r--tests/phpunit/includes/parser/PreprocessorTest.php10
-rw-r--r--tests/phpunit/includes/parser/RevisionOutputCacheTest.php2
-rw-r--r--tests/phpunit/includes/parser/StripStateTest.php4
-rw-r--r--tests/phpunit/includes/parser/TagHooksTest.php2
-rw-r--r--tests/phpunit/integration/includes/Rest/Handler/Helper/HtmlInputTransformHelperTest.php2
-rw-r--r--tests/phpunit/integration/includes/Rest/Handler/Helper/HtmlOutputRendererHelperTest.php4
-rw-r--r--tests/phpunit/integration/includes/Rest/Handler/ParsoidHandlerTest.php2
-rw-r--r--tests/phpunit/integration/includes/Rest/Handler/UpdateHandlerTest.php2
-rw-r--r--tests/phpunit/integration/includes/parser/Parsoid/Config/DataAccessTest.php2
-rw-r--r--tests/phpunit/integration/includes/parser/Parsoid/ParsoidParserTest.php2
-rw-r--r--tests/phpunit/integration/includes/parser/TidyTest.php4
-rw-r--r--tests/phpunit/unit/includes/content/FileContentHandlerTest.php2
-rw-r--r--tests/phpunit/unit/includes/content/Renderer/ContentRendererTest.php2
-rw-r--r--tests/phpunit/unit/includes/content/WikitextContentHandlerTest.php4
-rw-r--r--tests/phpunit/unit/includes/parser/LinkHolderArrayTest.php14
-rw-r--r--tests/phpunit/unit/includes/parser/ParserCacheFactoryTest.php2
-rw-r--r--tests/phpunit/unit/includes/parser/ParserCacheFilterTest.php2
-rw-r--r--tests/phpunit/unit/includes/parser/ParserFactoryTest.php4
-rw-r--r--tests/phpunit/unit/includes/parser/ParserObserverTest.php2
-rw-r--r--tests/phpunit/unit/includes/parser/Parsoid/Config/SiteConfigTest.php2
-rw-r--r--tests/phpunit/unit/includes/parser/Parsoid/ParsoidParserFactoryTest.php2
42 files changed, 111 insertions, 111 deletions
diff --git a/tests/phpunit/includes/OutputTransform/DummyDOMTransformStage.php b/tests/phpunit/includes/OutputTransform/DummyDOMTransformStage.php
index 0c7075e79110..fcd832ec27a9 100644
--- a/tests/phpunit/includes/OutputTransform/DummyDOMTransformStage.php
+++ b/tests/phpunit/includes/OutputTransform/DummyDOMTransformStage.php
@@ -3,8 +3,8 @@
namespace MediaWiki\Tests\OutputTransform;
use MediaWiki\OutputTransform\ContentDOMTransformStage;
+use MediaWiki\Parser\ParserOptions;
use MediaWiki\Parser\ParserOutput;
-use ParserOptions;
use Wikimedia\Parsoid\DOM\Document;
class DummyDOMTransformStage extends ContentDOMTransformStage {
diff --git a/tests/phpunit/includes/OutputTransform/Stages/HandleParsoidSectionLinksTest.php b/tests/phpunit/includes/OutputTransform/Stages/HandleParsoidSectionLinksTest.php
index 052022895e2b..4e16c3a97ed8 100644
--- a/tests/phpunit/includes/OutputTransform/Stages/HandleParsoidSectionLinksTest.php
+++ b/tests/phpunit/includes/OutputTransform/Stages/HandleParsoidSectionLinksTest.php
@@ -6,10 +6,10 @@ use MediaWiki\Config\ServiceOptions;
use MediaWiki\Language\Language;
use MediaWiki\OutputTransform\OutputTransformStage;
use MediaWiki\OutputTransform\Stages\HandleParsoidSectionLinks;
+use MediaWiki\Parser\ParserOptions;
use MediaWiki\Parser\ParserOutput;
use MediaWiki\Parser\Parsoid\PageBundleParserOutputConverter;
use MediaWiki\Tests\OutputTransform\OutputTransformStageTestBase;
-use ParserOptions;
use Psr\Log\NullLogger;
use Skin;
use Wikimedia\Parsoid\Core\PageBundle;
diff --git a/tests/phpunit/includes/OutputTransform/Stages/HandleSectionLinksTest.php b/tests/phpunit/includes/OutputTransform/Stages/HandleSectionLinksTest.php
index 297e4a14504b..60ef945d0336 100644
--- a/tests/phpunit/includes/OutputTransform/Stages/HandleSectionLinksTest.php
+++ b/tests/phpunit/includes/OutputTransform/Stages/HandleSectionLinksTest.php
@@ -7,10 +7,10 @@ use MediaWiki\Config\ServiceOptions;
use MediaWiki\MainConfigNames;
use MediaWiki\OutputTransform\OutputTransformStage;
use MediaWiki\OutputTransform\Stages\HandleSectionLinks;
+use MediaWiki\Parser\ParserOptions;
use MediaWiki\Parser\ParserOutput;
use MediaWiki\Tests\OutputTransform\OutputTransformStageTestBase;
use MediaWiki\Tests\OutputTransform\TestUtils;
-use ParserOptions;
use Psr\Log\NullLogger;
use Skin;
diff --git a/tests/phpunit/includes/Revision/RenderedRevisionTest.php b/tests/phpunit/includes/Revision/RenderedRevisionTest.php
index 1f60fc878994..996572b552a8 100644
--- a/tests/phpunit/includes/Revision/RenderedRevisionTest.php
+++ b/tests/phpunit/includes/Revision/RenderedRevisionTest.php
@@ -10,6 +10,7 @@ use MediaWiki\Content\WikitextContent;
use MediaWiki\Page\PageIdentity;
use MediaWiki\Page\PageIdentityValue;
use MediaWiki\Page\PageReference;
+use MediaWiki\Parser\ParserOptions;
use MediaWiki\Parser\ParserOutput;
use MediaWiki\Revision\MutableRevisionRecord;
use MediaWiki\Revision\MutableRevisionSlots;
@@ -24,7 +25,6 @@ use MediaWiki\Tests\Unit\Permissions\MockAuthorityTrait;
use MediaWiki\Title\TitleValue;
use MediaWiki\User\UserIdentityValue;
use MediaWikiIntegrationTestCase;
-use ParserOptions;
use PHPUnit\Framework\MockObject\MockObject;
use Wikimedia\TestingAccessWrapper;
diff --git a/tests/phpunit/includes/Revision/RevisionRendererTest.php b/tests/phpunit/includes/Revision/RevisionRendererTest.php
index 5ceb684eb5d3..db8308dc199c 100644
--- a/tests/phpunit/includes/Revision/RevisionRendererTest.php
+++ b/tests/phpunit/includes/Revision/RevisionRendererTest.php
@@ -13,6 +13,7 @@ use MediaWiki\MediaWikiServices;
use MediaWiki\Page\PageIdentity;
use MediaWiki\Page\PageIdentityValue;
use MediaWiki\Page\PageReference;
+use MediaWiki\Parser\ParserOptions;
use MediaWiki\Parser\ParserOutput;
use MediaWiki\Revision\MainSlotRoleHandler;
use MediaWiki\Revision\MutableRevisionRecord;
@@ -25,7 +26,6 @@ use MediaWiki\Tests\Unit\Permissions\MockAuthorityTrait;
use MediaWiki\Title\TitleFactory;
use MediaWiki\User\UserIdentityValue;
use MediaWikiIntegrationTestCase;
-use ParserOptions;
use PHPUnit\Framework\MockObject\MockObject;
use Wikimedia\Rdbms\IDatabase;
use Wikimedia\Rdbms\ILoadBalancer;
diff --git a/tests/phpunit/includes/Storage/DerivedPageDataUpdaterTest.php b/tests/phpunit/includes/Storage/DerivedPageDataUpdaterTest.php
index e4d67ab39cb3..3c29ac18c4d0 100644
--- a/tests/phpunit/includes/Storage/DerivedPageDataUpdaterTest.php
+++ b/tests/phpunit/includes/Storage/DerivedPageDataUpdaterTest.php
@@ -22,6 +22,7 @@ use MediaWiki\Page\PageIdentity;
use MediaWiki\Page\PageIdentityValue;
use MediaWiki\Page\ParserOutputAccess;
use MediaWiki\Parser\ParserCacheFactory;
+use MediaWiki\Parser\ParserOptions;
use MediaWiki\Revision\MutableRevisionRecord;
use MediaWiki\Revision\MutableRevisionSlots;
use MediaWiki\Revision\RevisionRecord;
@@ -37,7 +38,6 @@ use MediaWiki\User\UserIdentityValue;
use MediaWiki\Utils\MWTimestamp;
use MediaWikiIntegrationTestCase;
use MockTitleTrait;
-use ParserOptions;
use PHPUnit\Framework\MockObject\MockObject;
use Wikimedia\ObjectCache\BagOStuff;
use Wikimedia\Rdbms\Platform\ISQLPlatform;
diff --git a/tests/phpunit/includes/Storage/PageUpdaterTest.php b/tests/phpunit/includes/Storage/PageUpdaterTest.php
index 359924ec8cc5..5e2ad20228f3 100644
--- a/tests/phpunit/includes/Storage/PageUpdaterTest.php
+++ b/tests/phpunit/includes/Storage/PageUpdaterTest.php
@@ -12,6 +12,7 @@ use MediaWiki\Deferred\DeferredUpdates;
use MediaWiki\Json\FormatJson;
use MediaWiki\Message\Message;
use MediaWiki\Page\PageIdentityValue;
+use MediaWiki\Parser\ParserOptions;
use MediaWiki\Revision\RenderedRevision;
use MediaWiki\Revision\RevisionRecord;
use MediaWiki\Revision\SlotRecord;
@@ -21,7 +22,6 @@ use MediaWiki\Title\Title;
use MediaWiki\User\User;
use MediaWiki\User\UserIdentity;
use MediaWikiIntegrationTestCase;
-use ParserOptions;
use RecentChange;
use WikiPage;
diff --git a/tests/phpunit/includes/content/Transform/PreSaveTransformParamsValueTest.php b/tests/phpunit/includes/content/Transform/PreSaveTransformParamsValueTest.php
index 47d4cd4b0b73..aad4f34d1fe6 100644
--- a/tests/phpunit/includes/content/Transform/PreSaveTransformParamsValueTest.php
+++ b/tests/phpunit/includes/content/Transform/PreSaveTransformParamsValueTest.php
@@ -23,11 +23,11 @@ namespace MediaWiki\Tests\Content\Transform;
use MediaWiki\Content\Transform\PreSaveTransformParamsValue;
use MediaWiki\Page\PageReference;
+use MediaWiki\Parser\ParserOptions;
use MediaWiki\Title\Title;
use MediaWiki\User\User;
use MediaWiki\User\UserIdentity;
use MediaWikiIntegrationTestCase;
-use ParserOptions;
/**
* @covers \MediaWiki\Content\Transform\PreSaveTransformParamsValue
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
diff --git a/tests/phpunit/integration/includes/Rest/Handler/Helper/HtmlInputTransformHelperTest.php b/tests/phpunit/integration/includes/Rest/Handler/Helper/HtmlInputTransformHelperTest.php
index 315c53b210ca..e213e362a0ef 100644
--- a/tests/phpunit/integration/includes/Rest/Handler/Helper/HtmlInputTransformHelperTest.php
+++ b/tests/phpunit/integration/includes/Rest/Handler/Helper/HtmlInputTransformHelperTest.php
@@ -15,6 +15,7 @@ use MediaWiki\Message\Converter;
use MediaWiki\Message\TextFormatter;
use MediaWiki\Page\PageIdentity;
use MediaWiki\Page\PageIdentityValue;
+use MediaWiki\Parser\ParserOptions;
use MediaWiki\Parser\ParserOutput;
use MediaWiki\Parser\Parsoid\HtmlToContentTransform;
use MediaWiki\Parser\Parsoid\HtmlTransformFactory;
@@ -28,7 +29,6 @@ use MediaWiki\Revision\MutableRevisionRecord;
use MediaWiki\Revision\RevisionRecord;
use MediaWiki\Revision\SlotRecord;
use MediaWikiIntegrationTestCase;
-use ParserOptions;
use PHPUnit\Framework\MockObject\MockObject;
use Wikimedia\Bcp47Code\Bcp47Code;
use Wikimedia\Message\MessageValue;
diff --git a/tests/phpunit/integration/includes/Rest/Handler/Helper/HtmlOutputRendererHelperTest.php b/tests/phpunit/integration/includes/Rest/Handler/Helper/HtmlOutputRendererHelperTest.php
index 32461ad8ba41..d08dee5bdbae 100644
--- a/tests/phpunit/integration/includes/Rest/Handler/Helper/HtmlOutputRendererHelperTest.php
+++ b/tests/phpunit/integration/includes/Rest/Handler/Helper/HtmlOutputRendererHelperTest.php
@@ -17,7 +17,9 @@ use MediaWiki\Page\PageIdentityValue;
use MediaWiki\Page\PageRecord;
use MediaWiki\Page\PageReference;
use MediaWiki\Page\ParserOutputAccess;
+use MediaWiki\Parser\ParserCache;
use MediaWiki\Parser\ParserCacheFactory;
+use MediaWiki\Parser\ParserOptions;
use MediaWiki\Parser\ParserOutput;
use MediaWiki\Parser\Parsoid\HtmlTransformFactory;
use MediaWiki\Parser\Parsoid\LanguageVariantConverter;
@@ -38,8 +40,6 @@ use MediaWiki\Revision\SlotRecord;
use MediaWiki\Status\Status;
use MediaWiki\Utils\MWTimestamp;
use MediaWikiIntegrationTestCase;
-use ParserCache;
-use ParserOptions;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\MockObject\Rule\InvocationOrder;
use Psr\Log\LoggerInterface;
diff --git a/tests/phpunit/integration/includes/Rest/Handler/ParsoidHandlerTest.php b/tests/phpunit/integration/includes/Rest/Handler/ParsoidHandlerTest.php
index b8d069fdd648..2444ae371c24 100644
--- a/tests/phpunit/integration/includes/Rest/Handler/ParsoidHandlerTest.php
+++ b/tests/phpunit/integration/includes/Rest/Handler/ParsoidHandlerTest.php
@@ -11,6 +11,7 @@ use MediaWiki\Language\Language;
use MediaWiki\Language\LanguageCode;
use MediaWiki\MainConfigNames;
use MediaWiki\Page\PageIdentity;
+use MediaWiki\Parser\ParserCache;
use MediaWiki\Parser\ParserCacheFactory;
use MediaWiki\Parser\Parsoid\Config\PageConfigFactory;
use MediaWiki\Parser\Parsoid\HtmlToContentTransform;
@@ -36,7 +37,6 @@ use MediaWiki\Tests\Unit\DummyServicesTrait;
use MediaWiki\Title\TitleValue;
use MediaWiki\User\UserIdentityValue;
use MediaWikiIntegrationTestCase;
-use ParserCache;
use PHPUnit\Framework\MockObject\MockObject;
use Wikimedia\Message\MessageValue;
use Wikimedia\Parsoid\Config\DataAccess;
diff --git a/tests/phpunit/integration/includes/Rest/Handler/UpdateHandlerTest.php b/tests/phpunit/integration/includes/Rest/Handler/UpdateHandlerTest.php
index d9c1e2ebd82b..e224928e0de9 100644
--- a/tests/phpunit/integration/includes/Rest/Handler/UpdateHandlerTest.php
+++ b/tests/phpunit/integration/includes/Rest/Handler/UpdateHandlerTest.php
@@ -12,6 +12,7 @@ use MediaWiki\Linker\LinkRenderer;
use MediaWiki\MainConfigNames;
use MediaWiki\Message\Message;
use MediaWiki\Parser\MagicWordFactory;
+use MediaWiki\Parser\ParserFactory;
use MediaWiki\Parser\Parsoid\ParsoidParserFactory;
use MediaWiki\Rest\Handler\UpdateHandler;
use MediaWiki\Rest\LocalizedHttpException;
@@ -25,7 +26,6 @@ use MediaWiki\Title\Title;
use MediaWiki\Title\TitleFactory;
use MediaWikiLangTestCase;
use MockTitleTrait;
-use ParserFactory;
use PHPUnit\Framework\MockObject\MockObject;
use Wikimedia\Message\DataMessageValue;
use Wikimedia\Message\MessageValue;
diff --git a/tests/phpunit/integration/includes/parser/Parsoid/Config/DataAccessTest.php b/tests/phpunit/integration/includes/parser/Parsoid/Config/DataAccessTest.php
index c3c67966f0dc..2363783007ba 100644
--- a/tests/phpunit/integration/includes/parser/Parsoid/Config/DataAccessTest.php
+++ b/tests/phpunit/integration/includes/parser/Parsoid/Config/DataAccessTest.php
@@ -9,11 +9,11 @@ use MediaWiki\Content\Transform\ContentTransformer;
use MediaWiki\HookContainer\HookContainer;
use MediaWiki\MainConfigNames;
use MediaWiki\Page\File\BadFileLookup;
+use MediaWiki\Parser\ParserFactory;
use MediaWiki\Parser\ParserOutput;
use MediaWiki\Parser\Parsoid\Config\SiteConfig;
use MediaWiki\Title\TitleValue;
use MediaWikiIntegrationTestCase;
-use ParserFactory;
use RepoGroup;
use Wikimedia\Parsoid\Config\PageConfig;
use Wikimedia\Rdbms\ReadOnlyMode;
diff --git a/tests/phpunit/integration/includes/parser/Parsoid/ParsoidParserTest.php b/tests/phpunit/integration/includes/parser/Parsoid/ParsoidParserTest.php
index 094745c0582e..7f4bb46a00db 100644
--- a/tests/phpunit/integration/includes/parser/Parsoid/ParsoidParserTest.php
+++ b/tests/phpunit/integration/includes/parser/Parsoid/ParsoidParserTest.php
@@ -3,10 +3,10 @@
namespace MediaWiki\Tests\Parser\Parsoid;
use MediaWiki\MediaWikiServices;
+use MediaWiki\Parser\ParserOptions;
use MediaWiki\Parser\Parsoid\ParsoidParser;
use MediaWiki\Title\Title;
use MediaWikiIntegrationTestCase;
-use ParserOptions;
/**
* @covers \MediaWiki\Parser\Parsoid\ParsoidParser::parse
diff --git a/tests/phpunit/integration/includes/parser/TidyTest.php b/tests/phpunit/integration/includes/parser/TidyTest.php
index 01b6e31cd302..c9cbb67dc303 100644
--- a/tests/phpunit/integration/includes/parser/TidyTest.php
+++ b/tests/phpunit/integration/includes/parser/TidyTest.php
@@ -2,12 +2,12 @@
namespace MediaWiki\Tests\Parser;
+use MediaWiki\Parser\MWTidy;
use MediaWiki\Parser\Sanitizer;
-use MWTidy;
/**
* @group Parser
- * @covers \MWTidy
+ * @covers \MediaWiki\Parser\MWTidy
*/
class TidyTest extends \MediaWikiIntegrationTestCase {
diff --git a/tests/phpunit/unit/includes/content/FileContentHandlerTest.php b/tests/phpunit/unit/includes/content/FileContentHandlerTest.php
index 0307fde8aeec..6cbdd6ba1ad4 100644
--- a/tests/phpunit/unit/includes/content/FileContentHandlerTest.php
+++ b/tests/phpunit/unit/includes/content/FileContentHandlerTest.php
@@ -6,10 +6,10 @@ use MediaWiki\Content\FileContentHandler;
use MediaWiki\Languages\LanguageNameUtils;
use MediaWiki\Linker\LinkRenderer;
use MediaWiki\Parser\MagicWordFactory;
+use MediaWiki\Parser\ParserFactory;
use MediaWiki\Parser\Parsoid\ParsoidParserFactory;
use MediaWiki\Title\TitleFactory;
use MediaWikiUnitTestCase;
-use ParserFactory;
use SearchEngine;
use SearchIndexField;
use SearchIndexFieldDefinition;
diff --git a/tests/phpunit/unit/includes/content/Renderer/ContentRendererTest.php b/tests/phpunit/unit/includes/content/Renderer/ContentRendererTest.php
index d8afa70483d2..169708b456a8 100644
--- a/tests/phpunit/unit/includes/content/Renderer/ContentRendererTest.php
+++ b/tests/phpunit/unit/includes/content/Renderer/ContentRendererTest.php
@@ -27,10 +27,10 @@ use MediaWiki\Content\WikitextContent;
use MediaWiki\Content\WikitextContentHandler;
use MediaWiki\DAO\WikiAwareEntity;
use MediaWiki\Page\PageIdentityValue;
+use MediaWiki\Parser\ParserOptions;
use MediaWiki\Parser\ParserOutput;
use MediaWiki\Revision\MutableRevisionRecord;
use MediaWikiUnitTestCase;
-use ParserOptions;
use Wikimedia\UUID\GlobalIdGenerator;
/**
diff --git a/tests/phpunit/unit/includes/content/WikitextContentHandlerTest.php b/tests/phpunit/unit/includes/content/WikitextContentHandlerTest.php
index ed7b44a2de21..82d4034db21a 100644
--- a/tests/phpunit/unit/includes/content/WikitextContentHandlerTest.php
+++ b/tests/phpunit/unit/includes/content/WikitextContentHandlerTest.php
@@ -11,6 +11,8 @@ use MediaWiki\Linker\LinkRenderer;
use MediaWiki\Parser\MagicWord;
use MediaWiki\Parser\MagicWordFactory;
use MediaWiki\Parser\Parser;
+use MediaWiki\Parser\ParserFactory;
+use MediaWiki\Parser\ParserOptions;
use MediaWiki\Parser\ParserOutput;
use MediaWiki\Parser\Parsoid\ParsoidParser;
use MediaWiki\Parser\Parsoid\ParsoidParserFactory;
@@ -21,8 +23,6 @@ use MediaWiki\Title\TitleFactory;
use MediaWikiUnitTestCase;
use MockTitleTrait;
use MWException;
-use ParserFactory;
-use ParserOptions;
use ReflectionClass;
use Wikimedia\UUID\GlobalIdGenerator;
diff --git a/tests/phpunit/unit/includes/parser/LinkHolderArrayTest.php b/tests/phpunit/unit/includes/parser/LinkHolderArrayTest.php
index 8f3348934dfb..7d967e5e5735 100644
--- a/tests/phpunit/unit/includes/parser/LinkHolderArrayTest.php
+++ b/tests/phpunit/unit/includes/parser/LinkHolderArrayTest.php
@@ -4,9 +4,9 @@ declare( strict_types = 1 );
namespace MediaWiki\Tests\Parser;
-use LinkHolderArray;
use MediaWiki\Language\ILanguageConverter;
use MediaWiki\Linker\LinkRenderer;
+use MediaWiki\Parser\LinkHolderArray;
use MediaWiki\Parser\Parser;
use MediaWiki\Parser\ParserOutput;
use MediaWiki\Title\Title;
@@ -14,12 +14,12 @@ use MediaWikiUnitTestCase;
use Wikimedia\TestingAccessWrapper;
/**
- * @covers \LinkHolderArray
+ * @covers \MediaWiki\Parser\LinkHolderArray
*/
class LinkHolderArrayTest extends MediaWikiUnitTestCase {
/**
- * @covers \LinkHolderArray::merge
+ * @covers \MediaWiki\Parser\LinkHolderArray::merge
*/
public function testMerge() {
$link1 = new LinkHolderArray(
@@ -151,7 +151,7 @@ class LinkHolderArrayTest extends MediaWikiUnitTestCase {
}
/**
- * @covers \LinkHolderArray::clear
+ * @covers \MediaWiki\Parser\LinkHolderArray::clear
*/
public function testClear() {
$linkHolderArray = new LinkHolderArray(
@@ -173,7 +173,7 @@ class LinkHolderArrayTest extends MediaWikiUnitTestCase {
/**
* @dataProvider provideReplaceText
- * @covers \LinkHolderArray::replaceText
+ * @covers \MediaWiki\Parser\LinkHolderArray::replaceText
*
* @param string $input
* @param string $expected
@@ -242,8 +242,8 @@ class LinkHolderArrayTest extends MediaWikiUnitTestCase {
/**
* @dataProvider provideReplace_external
- * @covers \LinkHolderArray::replace
- * @covers \LinkHolderArray::replaceInterwiki
+ * @covers \MediaWiki\Parser\LinkHolderArray::replace
+ * @covers \MediaWiki\Parser\LinkHolderArray::replaceInterwiki
*
* @param string $text
* @param string $extended
diff --git a/tests/phpunit/unit/includes/parser/ParserCacheFactoryTest.php b/tests/phpunit/unit/includes/parser/ParserCacheFactoryTest.php
index 7b0bcf06d67a..014f2728e9e4 100644
--- a/tests/phpunit/unit/includes/parser/ParserCacheFactoryTest.php
+++ b/tests/phpunit/unit/includes/parser/ParserCacheFactoryTest.php
@@ -7,11 +7,11 @@ use MediaWiki\Json\JsonCodec;
use MediaWiki\MainConfigNames;
use MediaWiki\MainConfigSchema;
use MediaWiki\Page\WikiPageFactory;
+use MediaWiki\Parser\ParserCache;
use MediaWiki\Parser\ParserCacheFactory;
use MediaWiki\Parser\RevisionOutputCache;
use MediaWiki\Title\TitleFactory;
use MediaWikiUnitTestCase;
-use ParserCache;
use Psr\Log\NullLogger;
use Wikimedia\ObjectCache\HashBagOStuff;
use Wikimedia\ObjectCache\WANObjectCache;
diff --git a/tests/phpunit/unit/includes/parser/ParserCacheFilterTest.php b/tests/phpunit/unit/includes/parser/ParserCacheFilterTest.php
index 0da7df4138bd..08d35483651d 100644
--- a/tests/phpunit/unit/includes/parser/ParserCacheFilterTest.php
+++ b/tests/phpunit/unit/includes/parser/ParserCacheFilterTest.php
@@ -4,9 +4,9 @@ namespace MediaWiki\Tests\Parser;
use MediaWiki\Page\PageStoreRecord;
use MediaWiki\Parser\ParserCacheFilter;
+use MediaWiki\Parser\ParserOptions;
use MediaWiki\Parser\ParserOutput;
use MediaWikiUnitTestCase;
-use ParserOptions;
/**
* @covers \MediaWiki\Parser\ParserCacheFilter
diff --git a/tests/phpunit/unit/includes/parser/ParserFactoryTest.php b/tests/phpunit/unit/includes/parser/ParserFactoryTest.php
index adc35ad49fe0..8850bd818eef 100644
--- a/tests/phpunit/unit/includes/parser/ParserFactoryTest.php
+++ b/tests/phpunit/unit/includes/parser/ParserFactoryTest.php
@@ -13,6 +13,7 @@ use MediaWiki\Page\File\BadFileLookup;
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;
@@ -23,13 +24,12 @@ use MediaWiki\User\UserFactory;
use MediaWiki\User\UserNameUtils;
use MediaWiki\Utils\UrlUtils;
use MediaWikiUnitTestCase;
-use ParserFactory;
use TestLogger;
use Wikimedia\ObjectCache\WANObjectCache;
use Wikimedia\TestingAccessWrapper;
/**
- * @covers \ParserFactory
+ * @covers \MediaWiki\Parser\ParserFactory
*/
class ParserFactoryTest extends MediaWikiUnitTestCase {
diff --git a/tests/phpunit/unit/includes/parser/ParserObserverTest.php b/tests/phpunit/unit/includes/parser/ParserObserverTest.php
index 8f978b45f534..c886c8c26d9a 100644
--- a/tests/phpunit/unit/includes/parser/ParserObserverTest.php
+++ b/tests/phpunit/unit/includes/parser/ParserObserverTest.php
@@ -4,10 +4,10 @@ namespace MediaWiki\Tests\Parser;
use DummyContentForTesting;
use MediaWiki\Parser\ParserObserver;
+use MediaWiki\Parser\ParserOptions;
use MediaWiki\Parser\ParserOutput;
use MediaWiki\Title\Title;
use MediaWikiUnitTestCase;
-use ParserOptions;
use TestLogger;
/**
diff --git a/tests/phpunit/unit/includes/parser/Parsoid/Config/SiteConfigTest.php b/tests/phpunit/unit/includes/parser/Parsoid/Config/SiteConfigTest.php
index 8f5b48a5e009..098d68add807 100644
--- a/tests/phpunit/unit/includes/parser/Parsoid/Config/SiteConfigTest.php
+++ b/tests/phpunit/unit/includes/parser/Parsoid/Config/SiteConfigTest.php
@@ -16,6 +16,7 @@ use MediaWiki\Parser\MagicWord;
use MediaWiki\Parser\MagicWordArray;
use MediaWiki\Parser\MagicWordFactory;
use MediaWiki\Parser\Parser;
+use MediaWiki\Parser\ParserFactory;
use MediaWiki\Parser\Parsoid\Config\SiteConfig;
use MediaWiki\SpecialPage\SpecialPageFactory;
use MediaWiki\Title\NamespaceInfo;
@@ -23,7 +24,6 @@ use MediaWiki\User\Options\UserOptionsLookup;
use MediaWiki\Utils\UrlUtils;
use MediaWikiUnitTestCase;
use MessageCache;
-use ParserFactory;
use UnexpectedValueException;
use Wikimedia\Bcp47Code\Bcp47CodeValue;
use Wikimedia\Stats\NullStatsdDataFactory;
diff --git a/tests/phpunit/unit/includes/parser/Parsoid/ParsoidParserFactoryTest.php b/tests/phpunit/unit/includes/parser/Parsoid/ParsoidParserFactoryTest.php
index df3ba78feb3a..fc0fac0c6f76 100644
--- a/tests/phpunit/unit/includes/parser/Parsoid/ParsoidParserFactoryTest.php
+++ b/tests/phpunit/unit/includes/parser/Parsoid/ParsoidParserFactoryTest.php
@@ -22,11 +22,11 @@
namespace MediaWiki\Tests\Parser\Parsoid;
use MediaWiki\Languages\LanguageConverterFactory;
+use MediaWiki\Parser\ParserFactory;
use MediaWiki\Parser\Parsoid\Config\PageConfigFactory;
use MediaWiki\Parser\Parsoid\ParsoidParser;
use MediaWiki\Parser\Parsoid\ParsoidParserFactory;
use MediaWikiUnitTestCase;
-use ParserFactory;
use Wikimedia\Parsoid\Config\DataAccess;
use Wikimedia\Parsoid\Config\SiteConfig;
use Wikimedia\UUID\GlobalIdGenerator;