From 5350782908b3a409e58c999131d24dee4f07ccbc Mon Sep 17 00:00:00 2001 From: addshore Date: Thu, 1 Feb 2018 14:37:04 +0000 Subject: [PATCH] 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 --- tests/phpunit/includes/RevisionTest.php | 4 ++++ 1 file changed, 4 insertions(+) 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 = [ -- 2.20.1