summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'MLEB/Translate/tests/phpunit/TranslateHooksTest.php')
-rw-r--r--MLEB/Translate/tests/phpunit/TranslateHooksTest.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/MLEB/Translate/tests/phpunit/TranslateHooksTest.php b/MLEB/Translate/tests/phpunit/TranslateHooksTest.php
index 2133d81e..e6c4f21e 100644
--- a/MLEB/Translate/tests/phpunit/TranslateHooksTest.php
+++ b/MLEB/Translate/tests/phpunit/TranslateHooksTest.php
@@ -23,7 +23,7 @@ class TranslateHooksTest extends MediaWikiLangTestCase {
$this->setTemporaryHook( 'TranslatePostInitGroups', [ $this, 'getTestGroups' ] );
$mg = MessageGroups::singleton();
- $mg->setCache( new WANObjectCache( [ 'cache' => wfGetCache( 'hash' ) ] ) );
+ $mg->setCache( new WANObjectCache( [ 'cache' => new HashBagOStuff() ] ) );
$mg->recache();
MessageIndex::setInstance( new HashMessageIndex() );
@@ -47,7 +47,7 @@ class TranslateHooksTest extends MediaWikiLangTestCase {
$wikipage = WikiPage::factory( $title );
$content = ContentHandler::makeContent( '[[Category:Shouldnotbe]]', $title );
- $wikipage->doEditContent( $content, __METHOD__, 0, false, $user );
+ TranslateUtils::doPageEdit( $wikipage, $content, $user, __METHOD__ );
$this->assertEquals(
[],
$title->getParentCategories(),
@@ -58,7 +58,7 @@ class TranslateHooksTest extends MediaWikiLangTestCase {
$wikipage = WikiPage::factory( $title );
$content = ContentHandler::makeContent( '[[Category:Shouldbe]]', $title );
- $wikipage->doEditContent( $content, __METHOD__, 0, false, $user );
+ TranslateUtils::doPageEdit( $wikipage, $content, $user, __METHOD__ );
$this->assertEquals(
[ 'Category:Shouldbe' => 'MediaWiki:Ugakey2/qqq' ],
$title->getParentCategories(),
@@ -69,7 +69,7 @@ class TranslateHooksTest extends MediaWikiLangTestCase {
$wikipage = WikiPage::factory( $title );
$content = ContentHandler::makeContent( '[[Category:Shouldbealso]]', $title );
- $wikipage->doEditContent( $content, __METHOD__, 0, false, $user );
+ TranslateUtils::doPageEdit( $wikipage, $content, $user, __METHOD__ );
$this->assertEquals( [], $title->getParentCategories(), 'unknown message' );
}