revision: rename various $wikiId fields/parameters to $dbDomain
[lhc/web/wiklou.git] / tests / phpunit / includes / Revision / RevisionStoreFactoryTest.php
index 2e61745..84c815d 100644 (file)
@@ -23,6 +23,9 @@ use Wikimedia\TestingAccessWrapper;
 
 class RevisionStoreFactoryTest extends MediaWikiTestCase {
 
+       /**
+        * @covers \MediaWiki\Revision\RevisionStoreFactory::__construct
+        */
        public function testValidConstruction_doesntCauseErrors() {
                new RevisionStoreFactory(
                        $this->getMockLoadBalancerFactory(),
@@ -49,9 +52,10 @@ class RevisionStoreFactoryTest extends MediaWikiTestCase {
 
        /**
         * @dataProvider provideWikiIds
+        * @covers \MediaWiki\Revision\RevisionStoreFactory::getRevisionStore
         */
        public function testGetRevisionStore(
-               $wikiId,
+               $dbDomain,
                $mcrMigrationStage = MIGRATION_OLD,
                $contentHandlerUseDb = true
        ) {
@@ -77,14 +81,14 @@ class RevisionStoreFactoryTest extends MediaWikiTestCase {
                        $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 );
@@ -147,13 +151,10 @@ class RevisionStoreFactoryTest extends MediaWikiTestCase {
        }
 
        /**
-        * @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 );
        }
 
        /**