class RevisionStoreFactoryTest extends MediaWikiTestCase {
+ /**
+ * @covers \MediaWiki\Revision\RevisionStoreFactory::__construct
+ */
public function testValidConstruction_doesntCauseErrors() {
new RevisionStoreFactory(
$this->getMockLoadBalancerFactory(),
/**
* @dataProvider provideWikiIds
+ * @covers \MediaWiki\Revision\RevisionStoreFactory::getRevisionStore
*/
public function testGetRevisionStore(
- $wikiId,
+ $dbDomain,
$mcrMigrationStage = MIGRATION_OLD,
$contentHandlerUseDb = true
) {
$contentHandlerUseDb
);
- $store = $factory->getRevisionStore( $wikiId );
+ $store = $factory->getRevisionStore( $dbDomain );
$wrapper = TestingAccessWrapper::newFromObject( $store );
// ensure the correct object type is returned
$this->assertInstanceOf( RevisionStore::class, $store );
// ensure the RevisionStore is for the given wikiId
- $this->assertSame( $wikiId, $wrapper->wikiId );
+ $this->assertSame( $dbDomain, $wrapper->dbDomain );
// ensure all other required services are correctly set
$this->assertSame( $cache, $wrapper->cache );
}
/**
- * @return \PHPUnit_Framework_MockObject_MockObject|SlotRoleRegistry
+ * @return SlotRoleRegistry
*/
private function getMockSlotRoleRegistry() {
- $mock = $this->getMockBuilder( SlotRoleRegistry::class )
- ->disableOriginalConstructor()->getMock();
-
- return $mock;
+ return $this->createMock( SlotRoleRegistry::class );
}
/**