Conversion rules defined in a previous test case were leaking into
subsequent test cases. Existing tests had worked around this by defining
non-overlapping rules, but it's better to just fix the problem at the
source.
Change-Id: I65736520cd04bfe8949b29ade07338a6e1b88a4d
public function updateConversionTable( Title $title ) {
}
+
+ public function reloadTables() {
+ }
}
/**
* Reload the conversion tables.
*
- * @private
+ * Public only for use by test suites which need to reset the converter
+ * state.
+ *
*/
function reloadTables() {
if ( $this->mTables ) {
$context->setUser( $user );
$context->setLanguage( $lang );
$teardown[] = function () use ( $context ) {
+ // Clear language conversion tables
+ $context->getLanguage()->getConverter()->reloadTables();
// Reset context to the restored globals
$context->setUser( $GLOBALS['wgUser'] );
$context->setLanguage( $GLOBALS['wgContLang'] );