X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Fapi%2FApiQueryWatchlistIntegrationTest.php;h=6532635988d1bdbcccd716b48bfb3806657a5b07;hb=e8632ab0f6264851d2115a2e6338c2074b9a9b8c;hp=5f59d6fba46ad8021d777ba962fc02192915637e;hpb=7f87ffa3b5bb3d2f18fe45416ff6da0a3f10cfd2;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/api/ApiQueryWatchlistIntegrationTest.php b/tests/phpunit/includes/api/ApiQueryWatchlistIntegrationTest.php index 5f59d6fba4..6532635988 100644 --- a/tests/phpunit/includes/api/ApiQueryWatchlistIntegrationTest.php +++ b/tests/phpunit/includes/api/ApiQueryWatchlistIntegrationTest.php @@ -89,17 +89,14 @@ class ApiQueryWatchlistIntegrationTest extends ApiTestCase { User $patrollingUser ) { $title = Title::newFromLinkTarget( $target ); + $summary = CommentStoreComment::newUnsavedComment( trim( $summary ) ); $page = WikiPage::factory( $title ); - $status = $page->doEditContent( - ContentHandler::makeContent( $content, $title ), - $summary, - 0, - false, - $user - ); - /** @var Revision $rev */ - $rev = $status->value['revision']; - $rc = $rev->getRecentChange(); + + $updater = $page->newPageUpdater( $user ); + $updater->setContent( 'main', ContentHandler::makeContent( $content, $title ) ); + $rev = $updater->saveRevision( $summary ); + + $rc = MediaWikiServices::getInstance()->getRevisionStore()->getRecentChange( $rev ); $rc->doMarkPatrolled( $patrollingUser, false, [] ); }