Thiemo Mättig (WMDE) has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349415 )

Change subject: No need to use getMockBuilder on interfaces
......................................................................

No need to use getMockBuilder on interfaces

Change-Id: I4d44754e347ccbeeb597321435cbbf5f171aed70
---
M tests/phpunit/includes/AboutTopicRendererTest.php
M tests/phpunit/includes/specials/SpecialAboutTopicTest.php
2 files changed, 7 insertions(+), 13 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ArticlePlaceholder 
refs/changes/15/349415/1

diff --git a/tests/phpunit/includes/AboutTopicRendererTest.php 
b/tests/phpunit/includes/AboutTopicRendererTest.php
index 8a2d1e5..c592a8e 100644
--- a/tests/phpunit/includes/AboutTopicRendererTest.php
+++ b/tests/phpunit/includes/AboutTopicRendererTest.php
@@ -204,9 +204,7 @@
         * @return SiteLinkLookup
         */
        private function getSiteLinkLookup() {
-               $siteLinkLookup = $this->getMockBuilder( SiteLinkLookup::class )
-                       ->disableOriginalConstructor()
-                       ->getMock();
+               $siteLinkLookup = $this->getMock( SiteLinkLookup::class );
 
                $siteLinkLookup->expects( $this->any() )
                        ->method( 'getSiteLinksForItem' )
diff --git a/tests/phpunit/includes/specials/SpecialAboutTopicTest.php 
b/tests/phpunit/includes/specials/SpecialAboutTopicTest.php
index ab408ac..06cca06 100644
--- a/tests/phpunit/includes/specials/SpecialAboutTopicTest.php
+++ b/tests/phpunit/includes/specials/SpecialAboutTopicTest.php
@@ -113,29 +113,25 @@
        }
 
        private function getSiteLinkLookup() {
-               $siteLikLookup = $this->getMockBuilder( SiteLinkLookup::class )
-                       ->disableOriginalConstructor()
-                       ->getMock();
+               $siteLinkLookup = $this->getMock( SiteLinkLookup::class );
 
-               $siteLikLookup->expects( $this->any() )
+               $siteLinkLookup->expects( $this->any() )
                        ->method( 'getLinks' )
                        ->with( [ 1234 ], [ 'enwiki' ] )
                        ->will( $this->returnValue( [ [ 'enwiki', 'Beer', 1234 
] ] ) );
 
-               return $siteLikLookup;
+               return $siteLinkLookup;
        }
 
        private function getEntityIdParser() {
-               $siteLikLookup = $this->getMockBuilder( EntityIdParser::class )
-                       ->disableOriginalConstructor()
-                       ->getMock();
+               $idParser = $this->getMock( EntityIdParser::class );
 
-               $siteLikLookup->expects( $this->any() )
+               $idParser->expects( $this->any() )
                        ->method( 'parse' )
                        ->with( 'Q1234' )
                        ->will( $this->returnValue( new ItemId( 'Q1234' ) ) );
 
-               return $siteLikLookup;
+               return $idParser;
        }
 
        private function getEntityLookup() {

-- 
To view, visit https://gerrit.wikimedia.org/r/349415
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4d44754e347ccbeeb597321435cbbf5f171aed70
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ArticlePlaceholder
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to