jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/347830 )
Change subject: Do not use getMockBuilder() on interfaces
......................................................................
Do not use getMockBuilder() on interfaces
Same as I1cc80b9.
Interfaces do not have constructors, no need for disableOriginalConstructor().
;-) I found these with two regular expressions. The first extracted all
interface names in my local code base, the second found getMockBuilder()
calls with these interfaces.
Change-Id: I9750bcb5b84fad68cc420a20aa4949ec156cedea
---
M tests/phpunit/mediawiki/View/MediaInfoViewTest.php
1 file changed, 3 insertions(+), 4 deletions(-)
Approvals:
Addshore: Looks good to me, approved
jenkins-bot: Verified
diff --git a/tests/phpunit/mediawiki/View/MediaInfoViewTest.php
b/tests/phpunit/mediawiki/View/MediaInfoViewTest.php
index f71c08e..4aedfbc 100644
--- a/tests/phpunit/mediawiki/View/MediaInfoViewTest.php
+++ b/tests/phpunit/mediawiki/View/MediaInfoViewTest.php
@@ -4,6 +4,7 @@
use InvalidArgumentException;
use MediaWiki\Linker\LinkRenderer;
+use PHPUnit_Framework_MockObject_MockObject;
use PHPUnit_Framework_TestCase;
use Title;
use Wikibase\DataModel\Entity\EntityDocument;
@@ -43,12 +44,10 @@
}
/**
- * @return EntityTermsView
+ * @return EntityTermsView|PHPUnit_Framework_MockObject_MockObject
*/
private function newEntityTermsViewMock() {
- return $this->getMockBuilder( EntityTermsView::class )
- ->disableOriginalConstructor()
- ->getMock();
+ return $this->getMock( EntityTermsView::class );
}
/**
--
To view, visit https://gerrit.wikimedia.org/r/347830
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I9750bcb5b84fad68cc420a20aa4949ec156cedea
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikibaseMediaInfo
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) <[email protected]>
Gerrit-Reviewer: Addshore <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits