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
* @covers \MediaWiki\Storage\RevisionStore::newMutableRevisionFromArray
*/
public function testConstructFromRowWithBadPageId() {
* @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() );
MediaWiki\suppressWarnings();
$rev = new Revision( (object)[ 'rev_page' => 77777777 ] );
$this->assertSame( 77777777, $rev->getPage() );
* @covers Revision::loadFromTitle
*/
public function testLoadFromTitle() {
* @covers Revision::loadFromTitle
*/
public function testLoadFromTitle() {
+ $this->setMwGlobals( 'wgCommentTableSchemaMigrationStage', MIGRATION_OLD );
+ $this->overrideMwServices();
$title = $this->getMockTitle();
$conditions = [
$title = $this->getMockTitle();
$conditions = [