wiki.techinc.nl/tests/phpunit/includes
Thiemo Kreuz 9c57ea2b7f Replace complicated assertions with assertIsString() and such
This patch tries to make assertions in tests more readable by using more
self-documenting assertions as provided by modern PHPUnit versions. Among
a few others, these two main changes are done:

* I found a lot of assertions with the expected value being the *second*
parameter. I did not changed all of them. Only some that can be replaced
with assertNull() and such.

* I try to replace all `assertTrue( is_…() )` with dedicated assertions.

Change-Id: I1fc72188fbd0edacf13886e7f9a9eacbd85f13c2
2020-01-28 19:17:58 +00:00
..
actions Manual fix of the remaining assertInternalType & Co. 2019-12-15 00:20:10 +00:00
api Replace complicated assertions with assertIsString() and such 2020-01-28 19:17:58 +00:00
auth Coding style: Auto-fix MediaWiki.Classes.UnsortedUseStatements.UnsortedUse 2020-01-10 09:32:25 -08:00
block Coding style: Auto-fix MediaWiki.Classes.UnsortedUseStatements.UnsortedUse 2020-01-10 09:32:25 -08:00
cache Add LinkBatchFactory to inject services into LinkBatch 2020-01-06 17:02:31 +01:00
changes Coding style: Auto-fix MediaWiki.Usage.PHPUnit* 2020-01-10 10:17:12 +00:00
changetags tests: Add explicit return type void to setUp() and tearDown() 2019-10-30 14:31:22 -07:00
collation tests: Add explicit return type void to setUp() and tearDown() 2019-10-30 14:31:22 -07:00
config
content Merge "JsonContent: align object key cells at the top" 2020-01-24 00:16:28 +00:00
context Coding style: Auto-fix MediaWiki.Usage.PHPUnit* 2020-01-10 10:17:12 +00:00
db Coding style: Auto-fix MediaWiki.Classes.UnsortedUseStatements.UnsortedUse 2020-01-10 09:32:25 -08:00
debug Forbid wfDeprecated with $version = true 2019-12-31 13:53:36 +01:00
deferred tests: Add explicit return type void to setUp() and tearDown() 2019-10-30 14:31:22 -07:00
diff Fix most PHPUnit 8 compat issues in DBless tests 2019-12-15 00:24:21 +00:00
editpage Autofix 94 PHPUnit 8 compat issues 2019-12-13 15:29:10 +01:00
exception Fix most PHPUnit 8 compat issues in DBless tests 2019-12-15 00:24:21 +00:00
externalstore Coding style: Auto-fix MediaWiki.Usage.PHPUnit* 2020-01-10 10:17:12 +00:00
filebackend Coding style: Auto-fix MediaWiki.Usage.PHPUnit* 2020-01-10 10:17:12 +00:00
filerepo Add core REST API endpoint for media links 2020-01-22 15:10:44 -06:00
GlobalFunctions Coding style: Auto-fix MediaWiki.Usage.PHPUnit* 2020-01-10 10:17:12 +00:00
htmlform Stop using assertContains with string haystack 2019-12-15 00:22:44 +00:00
http Coding style: Auto-fix MediaWiki.Classes.UnsortedUseStatements.UnsortedUse 2020-01-10 09:32:25 -08:00
import tests: Add explicit return type void to setUp() and tearDown() 2019-10-30 14:31:22 -07:00
interwiki Remove Language::factory and getParentLanguage use 2019-10-27 12:34:28 +02:00
jobqueue Coding style: Auto-fix MediaWiki.Usage.PHPUnit* 2020-01-10 10:17:12 +00:00
language tests: Add explicit return type void to setUp() and tearDown() 2019-10-30 14:31:22 -07:00
libs ParamValidator: Tighten unrecognized value handling 2020-01-14 17:24:20 -05:00
linkeddata Fix most PHPUnit 8 compat issues in DBless tests 2019-12-15 00:24:21 +00:00
linker tests: Add explicit return type void to setUp() and tearDown() 2019-10-30 14:31:22 -07:00
logging Stop using assertContains with string haystack 2019-12-15 00:22:44 +00:00
mail
media Replace complicated assertions with assertIsString() and such 2020-01-28 19:17:58 +00:00
Message MediaWiki\Message: Extract Message↔MessageValue conversion from TextFormatter 2019-11-26 08:58:05 +00:00
Navigation Coding style: Auto-fix MediaWiki.Classes.UnsortedUseStatements.UnsortedUse 2020-01-10 09:32:25 -08:00
objectcache tests: Add explicit return type void to setUp() and tearDown() 2019-10-30 14:31:22 -07:00
page Add core REST API endpoint for media links 2020-01-22 15:10:44 -06:00
pager
parser Replace complicated assertions with assertIsString() and such 2020-01-28 19:17:58 +00:00
password Password policy to check if a password is a substring of a username 2020-01-13 23:09:13 +00:00
Permissions Coding style: Auto-fix MediaWiki.Usage.IsNull.IsNull 2020-01-10 14:17:13 -08:00
poolcounter Fixes for PHPUnit 8 compat in DB suite 2019-12-15 00:27:54 +00:00
preferences Coding style: Auto-fix MediaWiki.Usage.PHPUnit* 2020-01-10 10:17:12 +00:00
rcfeed tests: Add explicit return type void to setUp() and tearDown() 2019-10-30 14:31:22 -07:00
registration registration: Implement lazy-loaded attributes 2019-12-15 19:04:50 +00:00
resourceloader Merge "resourceloader: Allow packageFiles callbacks to return a file" 2020-01-20 22:07:51 +00:00
Rest Coding style: Auto-fix MediaWiki.Classes.UnsortedUseStatements.UnsortedUse 2020-01-10 09:32:25 -08:00
Revision Replace complicated assertions with assertIsString() and such 2020-01-28 19:17:58 +00:00
search Replace complicated assertions with assertIsString() and such 2020-01-28 19:17:58 +00:00
session Coding style: Auto-fix MediaWiki.Classes.UnsortedUseStatements.UnsortedUse 2020-01-10 09:32:25 -08:00
shell Manual fix of the remaining assertInternalType & Co. 2019-12-15 00:20:10 +00:00
site Replace complicated assertions with assertIsString() and such 2020-01-28 19:17:58 +00:00
skins Replace some oldskool @see with @inheritDoc 2019-11-08 18:00:27 +00:00
sparql Coding style: Auto-fix MediaWiki.Usage.IsNull.IsNull 2020-01-10 14:17:13 -08:00
specialpage Autofix 94 PHPUnit 8 compat issues 2019-12-13 15:29:10 +01:00
specials Coding style: Auto-fix MediaWiki.Classes.UnsortedUseStatements.UnsortedUse 2020-01-10 09:32:25 -08:00
Storage Coding style: Auto-fix MediaWiki.Classes.UnsortedUseStatements.UnsortedUse 2020-01-10 09:32:25 -08:00
title Coding style: Auto-fix MediaWiki.Usage.IsNull.IsNull 2020-01-10 14:17:13 -08:00
upload Create tests for UploadFromUrl::isAllowedHost 2020-01-19 20:22:37 +02:00
user Add more tests for the user class (email and username related mostly) 2020-01-27 01:40:57 +00:00
utils Provide UIDgenerator::getTimestampFromUUIDv1 method 2020-01-21 13:26:13 -08:00
watcheditem Coding style: Auto-fix MediaWiki.Usage.PHPUnit* 2020-01-10 10:17:12 +00:00
ActorMigrationTest.php Replace complicated assertions with assertIsString() and such 2020-01-28 19:17:58 +00:00
ActorMigrationTest.sql
AutoLoaderTest.php tests: Add explicit return type void to setUp() and tearDown() 2019-10-30 14:31:22 -07:00
AutopromoteTest.php
CategoryTest.php tests: Add explicit return type void to setUp() and tearDown() 2019-10-30 14:31:22 -07:00
CommentStoreCommentTest.php
CommentStoreTest.php Replace complicated assertions with assertIsString() and such 2020-01-28 19:17:58 +00:00
CommentStoreTest.sql
ContentSecurityPolicyTest.php tests: Add explicit return type void to setUp() and tearDown() 2019-10-30 14:31:22 -07:00
DeprecatedGlobalTest.php tests: Add explicit return type void to setUp() and tearDown() 2019-10-30 14:31:22 -07:00
DiffHistoryBlobTest.php tests: Add explicit return type void to setUp() and tearDown() 2019-10-30 14:31:22 -07:00
EditPageTest.php tests: Add explicit return type void to setUp() and tearDown() 2019-10-30 14:31:22 -07:00
ExportTest.php tests: Add explicit return type void to setUp() and tearDown() 2019-10-30 14:31:22 -07:00
ExtraParserTest.php Stop using assertContains with string haystack 2019-12-15 00:22:44 +00:00
FauxRequestTest.php Replace complicated assertions with assertIsString() and such 2020-01-28 19:17:58 +00:00
GitInfoTest.php Coding style: Auto-fix MediaWiki.Usage.PHPUnit* 2020-01-10 10:17:12 +00:00
HooksTest.php tests: Add explicit return type void to setUp() and tearDown() 2019-10-30 14:31:22 -07:00
HtmlTest.php tests: Add explicit return type void to setUp() and tearDown() 2019-10-30 14:31:22 -07:00
LinkerTest.php Stop using assertContains with string haystack 2019-12-15 00:22:44 +00:00
LinkFilterTest.php tests: Add explicit return type void to setUp() and tearDown() 2019-10-30 14:31:22 -07:00
ListToggleTest.php Remove Language::factory and getParentLanguage use 2019-10-27 12:34:28 +02:00
MagicWordFactoryTest.php Autofix 94 PHPUnit 8 compat issues 2019-12-13 15:29:10 +01:00
MediaWikiServicesTest.php Autofix 94 PHPUnit 8 compat issues 2019-12-13 15:29:10 +01:00
MediaWikiTest.php tests: Add explicit return type void to setUp() and tearDown() 2019-10-30 14:31:22 -07:00
MediaWikiVersionFetcherTest.php
MergeHistoryTest.php
MessageTest.php tests: Add explicit return type void to setUp() and tearDown() 2019-10-30 14:31:22 -07:00
MovePageTest.php Merge "Add target page as a parameter to articleexists message" 2020-01-02 21:08:50 +00:00
MultiHttpClientTest.php tests: Add explicit return type void to setUp() and tearDown() 2019-10-30 14:31:22 -07:00
MWTimestampTest.php tests: Add explicit return type void to setUp() and tearDown() 2019-10-30 14:31:22 -07:00
OutputPageTest.php Remove deprecated non-tidy OutputPage::parse/parseInline methods 2020-01-15 16:22:19 -05:00
PagePropsTest.php Remove duplicate variable name from class property PHPDocs 2019-12-02 12:58:29 +00:00
PrefixSearchTest.php tests: Add explicit return type void to setUp() and tearDown() 2019-10-30 14:31:22 -07:00
ReadOnlyModeTest.php
RevisionDbTestBase.php Replace complicated assertions with assertIsString() and such 2020-01-28 19:17:58 +00:00
RevisionMcrDbTest.php tests: Add explicit return type void to setUp() and tearDown() 2019-10-30 14:31:22 -07:00
RevisionMcrReadNewDbTest.php
RevisionMcrWriteBothDbTest.php
RevisionTest.php Backwards-compatible PHPUnit 8 preparations 2019-11-02 12:40:07 -07:00
RevisionTestModifyableContent.php
RevisionTestModifyableContentHandler.php
SampleTest.php tests: Add explicit return type void to setUp() and tearDown() 2019-10-30 14:31:22 -07:00
SiteStatsTest.php
StatusTest.php Autofix 94 PHPUnit 8 compat issues 2019-12-13 15:29:10 +01:00
SystemBlockTest.php
TemplateCategoriesTest.php
TemplateParserTest.php Update zordius/lightncandy v0.23 to v1.2.4 2020-01-14 19:26:49 -08:00
TestLocalisationCache.php
TestLogger.php
TestUser.php
TestUserRegistry.php Add missing @param and @return to documentation 2019-11-16 13:45:55 +01:00
TimeAdjustTest.php tests: Add explicit return type void to setUp() and tearDown() 2019-10-30 14:31:22 -07:00
TitleMethodsTest.php tests: Add explicit return type void to setUp() and tearDown() 2019-10-30 14:31:22 -07:00
TitlePermissionTest.php Coding style: Auto-fix MediaWiki.Usage.PHPUnit* 2020-01-10 10:17:12 +00:00
TitleTest.php Coding style: Auto-fix MediaWiki.Usage.PHPUnit* 2020-01-10 10:17:12 +00:00
WebRequestTest.php Fix most PHPUnit 8 compat issues in DBless tests 2019-12-15 00:24:21 +00:00
WikiMapTest.php tests: Add explicit return type void to setUp() and tearDown() 2019-10-30 14:31:22 -07:00
WikiReferenceTest.php
XmlTest.php Coding style: Auto-fix MediaWiki.Usage.PHPUnit* 2020-01-10 10:17:12 +00:00