*/
class PageUpdaterTest extends MediaWikiTestCase {
+ public static function setUpBeforeClass() {
+ parent::setUpBeforeClass();
+
+ // force service reset!
+ MediaWikiServices::getInstance()->resetServiceForTesting( 'RevisionStore' );
+ }
+
private function getDummyTitle( $method ) {
return Title::newFromText( $method, $this->getDefaultWikitextNS() );
}
// check site stats - this asserts that derived data updates where run.
$stats = $this->db->selectRow( 'site_stats', '*', '1=1' );
+ $this->assertNotNull( $stats, 'site_stats' );
$this->assertSame( $oldStats->ss_total_pages + 0, (int)$stats->ss_total_pages );
$this->assertSame( $oldStats->ss_total_edits + 2, (int)$stats->ss_total_edits );
}
$comment = CommentStoreComment::newUnsavedComment( $summary );
if ( !$content instanceof Content ) {
- $content = new TextContent( $content === null ? $summary : $content );
+ $content = new TextContent( $content ?? $summary );
}
$updater = $page->newPageUpdater( $user );