From 61ae7504df75130c18b35b5e7f48ac6874c2606b Mon Sep 17 00:00:00 2001 From: Thiemo Kreuz Date: Thu, 14 Jul 2022 14:42:07 +0200 Subject: Replace trivial usa of mock builder with createMock() shortcut createMock() does the same, but is much easier to read. A small difference is that some of the replacements made in this patch didn't use disableOriginalConstructor() before. In case this was relevant we should see the respective test fail. If not we can save some CPU cycles and skip these constructors. Change-Id: Ib98fb06e0fe753b7a53cb087a47e1159515a8ad5 --- tests/phpunit/includes/diff/SlotDiffRendererTest.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'tests/phpunit/includes/diff/SlotDiffRendererTest.php') diff --git a/tests/phpunit/includes/diff/SlotDiffRendererTest.php b/tests/phpunit/includes/diff/SlotDiffRendererTest.php index 9f15517c993c..35eea454f934 100644 --- a/tests/phpunit/includes/diff/SlotDiffRendererTest.php +++ b/tests/phpunit/includes/diff/SlotDiffRendererTest.php @@ -15,8 +15,7 @@ class SlotDiffRendererTest extends \MediaWikiIntegrationTestCase { $oldContent, $newContent, $allowedClasses, $expectedOldContent, $expectedNewContent, $expectedExceptionClass ) { - $slotDiffRenderer = $this->getMockBuilder( SlotDiffRenderer::class ) - ->getMock(); + $slotDiffRenderer = $this->createMock( SlotDiffRenderer::class ); try { // __call needs help deciding which parameter to take by reference call_user_func_array( [ TestingAccessWrapper::newFromObject( $slotDiffRenderer ), -- cgit v1.2.3