}
$updater->saveRevision( CommentStoreComment::newUnsavedComment( "testing" ) );
+ if ( !$updater->wasSuccessful() ) {
+ $this->fail( $updater->getStatus()->getWikiText() );
+ }
return $page;
}
);
$logId = $status->getValue();
$actorQuery = ActorMigration::newMigration()->getJoin( 'log_user' );
+ $commentQuery = MediaWikiServices::getInstance()->getCommentStore()->getJoin( 'log_comment' );
$this->assertSelect(
- [ 'logging' ] + $actorQuery['tables'], /* table */
+ [ 'logging' ] + $actorQuery['tables'] + $commentQuery['tables'], /* table */
[
'log_type',
'log_action',
- 'log_comment',
+ 'log_comment' => $commentQuery['fields']['log_comment_text'],
'log_user' => $actorQuery['fields']['log_user'],
'log_user_text' => $actorQuery['fields']['log_user_text'],
'log_namespace',
$page->getTitle()->getDBkey(),
] ],
[],
- $actorQuery['joins']
+ $actorQuery['joins'] + $commentQuery['joins']
);
}
);
$logId = $status->getValue();
$actorQuery = ActorMigration::newMigration()->getJoin( 'log_user' );
+ $commentQuery = MediaWikiServices::getInstance()->getCommentStore()->getJoin( 'log_comment' );
$this->assertSelect(
- [ 'logging' ] + $actorQuery['tables'], /* table */
+ [ 'logging' ] + $actorQuery['tables'] + $commentQuery['tables'], /* table */
[
'log_type',
'log_action',
- 'log_comment',
+ 'log_comment' => $commentQuery['fields']['log_comment_text'],
'log_user' => $actorQuery['fields']['log_user'],
'log_user_text' => $actorQuery['fields']['log_user_text'],
'log_namespace',
$page->getTitle()->getDBkey(),
] ],
[],
- $actorQuery['joins']
+ $actorQuery['joins'] + $commentQuery['joins']
);
}
);
$logId = $status->getValue();
$actorQuery = ActorMigration::newMigration()->getJoin( 'log_user' );
+ $commentQuery = MediaWikiServices::getInstance()->getCommentStore()->getJoin( 'log_comment' );
$this->assertSelect(
- [ 'logging' ] + $actorQuery['tables'], /* table */
+ [ 'logging' ] + $actorQuery['tables'] + $commentQuery['tables'], /* table */
[
'log_type',
'log_action',
- 'log_comment',
+ 'log_comment' => $commentQuery['fields']['log_comment_text'],
'log_user' => $actorQuery['fields']['log_user'],
'log_user_text' => $actorQuery['fields']['log_user_text'],
'log_namespace',
$page->getTitle()->getDBkey(),
] ],
[],
- $actorQuery['joins']
+ $actorQuery['joins'] + $commentQuery['joins']
);
$this->assertNull(
wfTimestamp( TS_UNIX, $initialRevision->getTimestamp() ) - 1
);
- $olderRevison = new Revision(
+ $olderRevision = new Revision(
[
'id' => 9989,
'page' => $page->getId(),
]
);
- $result = $page->updateIfNewerOn( $this->db, $olderRevison );
+ $result = $page->updateIfNewerOn( $this->db, $olderRevision );
$this->assertFalse( $result );
}
// Make sure the log entry looks good
// log_params is not checked here
$actorQuery = ActorMigration::newMigration()->getJoin( 'log_user' );
+ $commentQuery = MediaWikiServices::getInstance()->getCommentStore()->getJoin( 'log_comment' );
$this->assertSelect(
- [ 'logging' ] + $actorQuery['tables'],
+ [ 'logging' ] + $actorQuery['tables'] + $commentQuery['tables'],
[
- 'log_comment',
+ 'log_comment' => $commentQuery['fields']['log_comment_text'],
'log_user' => $actorQuery['fields']['log_user'],
'log_user_text' => $actorQuery['fields']['log_user_text'],
'log_namespace',
$page->getTitle()->getDBkey(),
] ],
[],
- $actorQuery['joins']
+ $actorQuery['joins'] + $commentQuery['joins']
);
}