From: addshore Date: Thu, 1 Feb 2018 14:37:04 +0000 (+0000) Subject: Force CommentMigration MIGRATION_OLD in 2 RevisionTest tests X-Git-Tag: 1.31.0-rc.0~699^2 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=5350782908b3a409e58c999131d24dee4f07ccbc;ds=sidebyside Force CommentMigration MIGRATION_OLD in 2 RevisionTest tests These tests fail when the comment store migration is not set to old, this probably indicates that we need some more tests for other cases, or that we don't want to test the comment store functionality here and should mock comment store. Change-Id: I06d2171498da6e07997569d4a74a0c5cfc913f33 --- diff --git a/tests/phpunit/includes/RevisionTest.php b/tests/phpunit/includes/RevisionTest.php index 73d69a528c..e2126fc919 100644 --- a/tests/phpunit/includes/RevisionTest.php +++ b/tests/phpunit/includes/RevisionTest.php @@ -317,6 +317,8 @@ class RevisionTest extends MediaWikiTestCase { * @covers \MediaWiki\Storage\RevisionStore::newMutableRevisionFromArray */ public function testConstructFromRowWithBadPageId() { + $this->setMwGlobals( 'wgCommentTableSchemaMigrationStage', MIGRATION_OLD ); + $this->overrideMwServices(); MediaWiki\suppressWarnings(); $rev = new Revision( (object)[ 'rev_page' => 77777777 ] ); $this->assertSame( 77777777, $rev->getPage() ); @@ -608,6 +610,8 @@ class RevisionTest extends MediaWikiTestCase { * @covers Revision::loadFromTitle */ public function testLoadFromTitle() { + $this->setMwGlobals( 'wgCommentTableSchemaMigrationStage', MIGRATION_OLD ); + $this->overrideMwServices(); $title = $this->getMockTitle(); $conditions = [