tests: Prefer PHPUnit's assertSame() when comparing empty strings
authorThiemo Kreuz <thiemo.kreuz@wikimedia.de>
Tue, 17 Sep 2019 14:28:35 +0000 (16:28 +0200)
committerKrinkle <krinklemail@gmail.com>
Fri, 20 Sep 2019 15:27:58 +0000 (15:27 +0000)
commite06ce9f4676699f4b9a11126d35a421f87b7d006
tree2e6ed8d0d02aa3daf5e4beb53832a64e6ca53e3b
parenta99171228d167224e376cf584739daf624ebaf71
tests: Prefer PHPUnit's assertSame() when comparing empty strings

assertSame() is guaranteed to never do any magic type conversion.
This can be critical when accidentially comparing empty strings (a
value PHP considers to be "falsy") to false, 0, 0.0, null, and such.

Change-Id: I2e2685c5992cae252f629a68ffe1a049f2e5ed1b
18 files changed:
tests/phpunit/MediaWikiCoversValidator.php
tests/phpunit/includes/FauxRequestTest.php
tests/phpunit/includes/HtmlTest.php
tests/phpunit/includes/XmlTest.php
tests/phpunit/includes/changes/EnhancedChangesListTest.php
tests/phpunit/includes/content/ContentHandlerTest.php
tests/phpunit/includes/content/UnknownContentHandlerTest.php
tests/phpunit/includes/content/UnknownContentTest.php
tests/phpunit/includes/content/WikitextContentHandlerTest.php
tests/phpunit/includes/db/LBFactoryTest.php
tests/phpunit/includes/filerepo/file/LocalFileTest.php
tests/phpunit/includes/http/HttpTest.php
tests/phpunit/includes/linker/LinkRendererTest.php
tests/phpunit/includes/resourceloader/ResourceLoaderTest.php
tests/phpunit/includes/site/SiteTest.php
tests/phpunit/languages/LanguageTest.php
tests/phpunit/maintenance/DumpTestCase.php
tests/phpunit/unit/includes/password/PasswordFactoryTest.php