Page MenuHomePhorge

No OneTemporary

Size
5 KB
Referenced Files
None
Subscribers
None
diff --git a/tests/phpunit/includes/ResourceLoader/WikiModuleTest.php b/tests/phpunit/includes/ResourceLoader/WikiModuleTest.php
index 73f6be19d05..1739460af57 100644
--- a/tests/phpunit/includes/ResourceLoader/WikiModuleTest.php
+++ b/tests/phpunit/includes/ResourceLoader/WikiModuleTest.php
@@ -448,11 +448,6 @@ class WikiModuleTest extends ResourceLoaderTestCase {
'Redirect resolved by getContent'
);
}
-
- protected function tearDown(): void {
- Title::clearCaches();
- parent::tearDown();
- }
}
class TestResourceLoaderWikiModule extends WikiModule {
diff --git a/tests/phpunit/includes/api/ApiComparePagesTest.php b/tests/phpunit/includes/api/ApiComparePagesTest.php
index b86c753f5e6..72363a61df8 100644
--- a/tests/phpunit/includes/api/ApiComparePagesTest.php
+++ b/tests/phpunit/includes/api/ApiComparePagesTest.php
@@ -138,8 +138,6 @@ class ApiComparePagesTest extends ApiTestCase {
],
'comment' => 'Test for ApiComparePages',
] );
-
- Title::clearCaches(); // Otherwise it has the wrong latest revision for some reason
}
protected function doReplacements( &$value ) {
diff --git a/tests/phpunit/includes/linker/LinkRendererTest.php b/tests/phpunit/includes/linker/LinkRendererTest.php
index 51eaddc036e..65479ee9848 100644
--- a/tests/phpunit/includes/linker/LinkRendererTest.php
+++ b/tests/phpunit/includes/linker/LinkRendererTest.php
@@ -315,9 +315,4 @@ class LinkRendererTest extends MediaWikiLangTestCase {
$linkRenderer->getLinkClasses( $redirectTitle )
);
}
-
- protected function tearDown(): void {
- Title::clearCaches();
- parent::tearDown();
- }
}
diff --git a/tests/phpunit/includes/page/MovePageTest.php b/tests/phpunit/includes/page/MovePageTest.php
index d8fabf3f2b5..c9c168536fd 100644
--- a/tests/phpunit/includes/page/MovePageTest.php
+++ b/tests/phpunit/includes/page/MovePageTest.php
@@ -354,10 +354,6 @@ class MovePageTest extends MediaWikiIntegrationTestCase {
$status
);
} else {
- // Create Title objects from text, so they will end up in the instance
- // cache. In assertMoved() we'll check that we are not
- // getting this stale object from Title::newFromText().
- Title::clearCaches();
$oldFromText = Title::newFromText( $old->getPrefixedText() );
$newFromText = Title::newFromText( $new->getPrefixedText() );
$oldFromText->getId();
diff --git a/tests/phpunit/includes/parser/ExtraParserTest.php b/tests/phpunit/includes/parser/ExtraParserTest.php
index 7817744c27f..8124f36420a 100644
--- a/tests/phpunit/includes/parser/ExtraParserTest.php
+++ b/tests/phpunit/includes/parser/ExtraParserTest.php
@@ -274,7 +274,7 @@ class ExtraParserTest extends MediaWikiIntegrationTestCase {
MainConfigNames::InterwikiCache,
ClassicInterwikiLookup::buildCdbHash( $testInterwikis )
);
- Title::clearCaches();
+
$this->parser->startExternalParse(
Title::newFromText( __FUNCTION__ ),
$this->options,
diff --git a/tests/phpunit/includes/search/TitleMatcherTest.php b/tests/phpunit/includes/search/TitleMatcherTest.php
index b7cc9b3aec7..baae409f4f0 100644
--- a/tests/phpunit/includes/search/TitleMatcherTest.php
+++ b/tests/phpunit/includes/search/TitleMatcherTest.php
@@ -168,9 +168,4 @@ class TitleMatcherTest extends MediaWikiIntegrationTestCase {
$result = $matcher->getNearMatchResultSet( 'Test Link Wrong' );
$this->assertSame( 0, $result->numRows() );
}
-
- protected function tearDown(): void {
- Title::clearCaches();
- parent::tearDown();
- }
}
diff --git a/tests/phpunit/includes/title/TitleTest.php b/tests/phpunit/includes/title/TitleTest.php
index 25d3d7ed6d8..2918208fe68 100644
--- a/tests/phpunit/includes/title/TitleTest.php
+++ b/tests/phpunit/includes/title/TitleTest.php
@@ -84,7 +84,6 @@ class TitleTest extends MediaWikiIntegrationTestCase {
}
protected function tearDown(): void {
- Title::clearCaches();
parent::tearDown();
// delete dummy pages
$this->getNonexistingTestPage( 'UTest1' );
diff --git a/tests/phpunit/includes/title/TitleUrlTest.php b/tests/phpunit/includes/title/TitleUrlTest.php
index 139bd704ed8..f416271b9b5 100644
--- a/tests/phpunit/includes/title/TitleUrlTest.php
+++ b/tests/phpunit/includes/title/TitleUrlTest.php
@@ -52,11 +52,6 @@ class TitleUrlTest extends MediaWikiLangTestCase {
] );
}
- protected function tearDown(): void {
- Title::clearCaches();
- parent::tearDown();
- }
-
public function testUrlsForSimpleTitle() {
$title = Title::makeTitle( NS_USER, 'Göatee' );
$name = $title->getPrefixedURL();
diff --git a/tests/phpunit/maintenance/CleanupCapsTest.php b/tests/phpunit/maintenance/CleanupCapsTest.php
index 824524f7cb6..694f11ddebc 100644
--- a/tests/phpunit/maintenance/CleanupCapsTest.php
+++ b/tests/phpunit/maintenance/CleanupCapsTest.php
@@ -18,13 +18,6 @@ class CleanupCapsTest extends MaintenanceBaseTestCase {
return CleanupCaps::class;
}
- protected function setUp(): void {
- parent::setUp();
- // We clear the title cache because these tests will create title objects with lowercase form and uppercase
- // form
- Title::clearCaches();
- }
-
/** @dataProvider provideCapitalLinksValues */
public function testWhenNamespaceEmpty( bool $capitalLinks, string $stringToExpectInOutput ) {
$this->overrideConfigValue( MainConfigNames::CapitalLinks, $capitalLinks );

File Metadata

Mime Type
text/x-diff
Expires
Sat, Jul 5, 5:32 AM (1 d, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
227663
Default Alt Text
(5 KB)

Event Timeline