jenkins-bot has submitted this change and it was merged.

Change subject: Mock ChangesList instead of constructing.
......................................................................


Mock ChangesList instead of constructing.

No need to actually make one of these.
Also this class may be going abstract in core.

Change-Id: Ice8e443657e19699444653463c0814132a18989c
---
M repo/tests/phpunit/includes/Hooks/LabelPrefetchHookHandlersTest.php
1 file changed, 4 insertions(+), 1 deletion(-)

Approvals:
  JanZerebecki: Looks good to me, approved
  jenkins-bot: Verified



diff --git 
a/repo/tests/phpunit/includes/Hooks/LabelPrefetchHookHandlersTest.php 
b/repo/tests/phpunit/includes/Hooks/LabelPrefetchHookHandlersTest.php
index 1486476..2cd7d93 100644
--- a/repo/tests/phpunit/includes/Hooks/LabelPrefetchHookHandlersTest.php
+++ b/repo/tests/phpunit/includes/Hooks/LabelPrefetchHookHandlersTest.php
@@ -133,7 +133,10 @@
                $context->setRequest( new FauxRequest() );
                $context->setTitle( new Title( NS_SPECIAL, 'Watchlist' ) );
 
-               $changesList = new ChangesList( $context );
+               /** @var ChangesList $changesList */
+               $changesList = $this->getMockBuilder( 'ChangesList' )
+               ->disableOriginalConstructor()
+               ->getMock();
 
                $linkBeginHookHandler->doChangesListInitRows(
                        $changesList,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ice8e443657e19699444653463c0814132a18989c
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Addshore <[email protected]>
Gerrit-Reviewer: Aude <[email protected]>
Gerrit-Reviewer: Daniel Kinzler <[email protected]>
Gerrit-Reviewer: Hoo man <[email protected]>
Gerrit-Reviewer: JanZerebecki <[email protected]>
Gerrit-Reviewer: Jeroen De Dauw <[email protected]>
Gerrit-Reviewer: Thiemo Mättig (WMDE) <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to