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/installer/WebInstallerOutputTest.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/installer/WebInstallerOutputTest.php')
-rw-r--r-- | tests/phpunit/includes/installer/WebInstallerOutputTest.php | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/tests/phpunit/includes/installer/WebInstallerOutputTest.php b/tests/phpunit/includes/installer/WebInstallerOutputTest.php index 7460028d5aee..3ea3f3f81d4e 100644 --- a/tests/phpunit/includes/installer/WebInstallerOutputTest.php +++ b/tests/phpunit/includes/installer/WebInstallerOutputTest.php @@ -6,9 +6,7 @@ class WebInstallerOutputTest extends MediaWikiIntegrationTestCase { */ public function testGetCSS() { $_SERVER['DOCUMENT_ROOT'] = __DIR__ . '../../../'; - $installer = $this->getMockBuilder( WebInstaller::class ) - ->disableOriginalConstructor() - ->getMock(); + $installer = $this->createMock( WebInstaller::class ); $out = new WebInstallerOutput( $installer ); $css = $out->getCSS(); $this->assertStringContainsString( |