diff options
author | Thiemo Kreuz <thiemo.kreuz@wikimedia.de> | 2022-07-14 14:42:07 +0200 |
---|---|---|
committer | Thiemo Kreuz (WMDE) <thiemo.kreuz@wikimedia.de> | 2022-07-15 16:43:48 +0000 |
commit | 61ae7504df75130c18b35b5e7f48ac6874c2606b (patch) | |
tree | 0ecba743bfd432dc24b7401511c6952c3480636b /tests/phpunit/includes/diff/SlotDiffRendererTest.php | |
parent | 37764c80cc173df0b0bb92fc7f33d6c2161cdb59 (diff) | |
download | mediawikicore-61ae7504df75130c18b35b5e7f48ac6874c2606b.tar.gz mediawikicore-61ae7504df75130c18b35b5e7f48ac6874c2606b.zip |
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
Diffstat (limited to 'tests/phpunit/includes/diff/SlotDiffRendererTest.php')
-rw-r--r-- | tests/phpunit/includes/diff/SlotDiffRendererTest.php | 3 |
1 files changed, 1 insertions, 2 deletions
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 ), |