$store = new RevisionStore(
$services->getDBLoadBalancer(),
$services->getService( '_SqlBlobStore' ),
- $services->getMainWANObjectCache()
+ $services->getMainWANObjectCache(),
+ $services->getCommentStore()
);
$store->setContentHandlerUseDB( $this->getContentHandlerUseDB() );
$this->assertEquals( __METHOD__, $rev->getContent()->getNativeData() );
}
+ /**
+ * @covers Revision::newNullRevision
+ */
+ public function testNewNullRevision_badPage() {
+ $dbw = wfGetDB( DB_MASTER );
+ $rev = Revision::newNullRevision( $dbw, -1, 'a null revision', false );
+
+ $this->assertNull( $rev );
+ }
+
/**
* @covers Revision::insertOn
*/
}
/**
+ * @covers Revision::userWasLastToEdit
* @dataProvider provideUserWasLastToEdit
*/
public function testUserWasLastToEdit( $sinceIdx, $expectedLast ) {
public function provideGetContentHandler() {
// NOTE: we expect the help namespace to always contain wikitext
return [
- [ 'hello world', 'Help:Hello', null, null, 'WikitextContentHandler' ],
- [ 'hello world', 'User:hello/there.css', null, null, 'CssContentHandler' ],
- [ serialize( 'hello world' ), 'Dummy:Hello', null, null, 'DummyContentHandlerForTesting' ],
+ [ 'hello world', 'Help:Hello', null, null, WikitextContentHandler::class ],
+ [ 'hello world', 'User:hello/there.css', null, null, CssContentHandler::class ],
+ [ serialize( 'hello world' ), 'Dummy:Hello', null, null, DummyContentHandlerForTesting::class ],
];
}