Also do so in various other test classes.
Follows-up
170c49d61cb8. Fixes Travis CI regression:
> 1) MediaWiki\Tests\Revision\MutableRevisionRecordTest::testSetGetPageId
> Failed asserting that 2 is identical to 0.
> tests/phpunit/includes/Revision/MutableRevisionRecordTest.php:129
Change-Id: I41c8bda8e620ebe7608a393d81f3b0f13af68ba7
use RevisionRecordTests;
+ function setUp() {
+ Title::clearCaches();
+ parent::setUp();
+ }
+
/**
* @param array $rowOverrides
*
$this->assertNotSame( $title1, $title2, 'title cache should be empty' );
$this->assertEquals( 0, $linkCache->getGoodLinkID( 'Foo' ), 'link cache should be empty' );
}
+
+ function tearDown() {
+ Title::clearCaches();
+ parent::tearDown();
+ }
}
);
}
+ function tearDown() {
+ Title::clearCaches();
+ parent::tearDown();
+ }
}
'Redirect resolved by getContent'
);
}
+
+ function tearDown() {
+ Title::clearCaches();
+ parent::tearDown();
+ }
}
class TestResourceLoaderWikiModule extends ResourceLoaderWikiModule {
$title = $matcher->getNearMatch( $searchterm );
$this->assertEquals( $expected, $title === null ? null : (string)$title );
}
+
+ function tearDown() {
+ Title::clearCaches();
+ parent::tearDown();
+ }
}