wiki.techinc.nl/tests/phpunit/includes
Bartosz Dziewoński ec79aa3943 SQLPlatform: Introduce buildComparison()
Builds a condition comparing multiple values, for use with indexes
that cover multiple fields, common when e.g. paging through results
or doing batch operations. Can also be to generate a simple comparison
without writing raw SQL (see T210206).

Update a few manually constructed conditions to use this method.
There are more maintenance scripts and API classes that use the
same patterns, but this is a start.

As you can see by the code I'm replacing, there are many ways to do
this. I picked the one used by maintenance/TableCleanup.php, since
I found it the easiest to understand.

Change-Id: Ic368a87fb5ce4c13608b03206cd68518ec9732d4
2022-09-10 04:22:19 +02:00
..
actions tests: don't assume wgLanguageCode is 'en' 2022-07-21 19:32:41 -04:00
api Merge "ApiTestCase: Drop testApiTestGroup forcing use of medium/large" 2022-08-29 13:49:16 +00:00
auth Rewrite CheckBlocksSecondaryAuthenticationProviderTest 2022-08-30 19:06:03 -07:00
block tests: Remove resetServiceForTesting after overrideConfigValues 2022-07-27 23:08:27 +02:00
cache Inline a few more trivial createMock() calls in tests 2022-08-08 09:50:50 +02:00
changes tests: Migrate setMwGlobals() to overrideConfigValue(s)() 2022-07-23 05:53:49 +01:00
changetags tests: Migrate setMwGlobals() to overrideConfigValue(s)() 2022-07-23 05:53:49 +01:00
collation IcuCollation: Remove unnecessary rtrim() and unset() 2022-05-21 02:02:39 -04:00
config
content Customise error message for invalid JSON, add hook 2022-08-26 01:22:10 +05:30
context Revert "Setup: Promote clearActionName log message to runtime warning" 2022-07-12 10:17:59 +00:00
db rdbms: remove getTopologyRootPrimary() and clean up related fields/parameters 2022-08-26 12:26:10 -07:00
debug tests: Migrate setMwGlobals() to overrideConfigValue(s)() 2022-07-23 05:53:49 +01:00
deferred tests: Migrate setMwGlobals() to overrideConfigValue(s)() 2022-07-23 05:53:49 +01:00
diff tests: Migrate setMwGlobals() to overrideConfigValue(s)() 2022-07-23 05:53:49 +01:00
editpage tests: Migrate setMwGlobals() to overrideConfigValue(s) 2022-07-27 18:07:00 +01:00
exception tests: Migrate away from setMwGlobals() 2022-08-22 20:17:49 +00:00
externalstore Use ::class to refer to class names 2022-08-17 22:59:17 +02:00
filebackend tests: Migrate away from setMwGlobals() 2022-08-22 20:17:49 +00:00
filerepo tests: Migrate setMwGlobals() to overrideConfigValue(s) 2022-07-27 18:07:00 +01:00
GlobalFunctions tests: Migrate setMwGlobals() to overrideConfigValue(s) 2022-07-27 18:07:00 +01:00
HookContainer
htmlform tests: Use Title::makeTitle instead of Title::newFromText 2022-07-06 00:44:00 +02:00
http Migrate usage of setMwGlobals() to overrideConfigValue(s) 2022-08-01 06:16:22 +01:00
import Migrate usage of setMwGlobals() to overrideConfigValue(s) 2022-08-01 06:16:22 +01:00
installer Replace trivial usa of mock builder with createMock() shortcut 2022-07-15 16:43:48 +00:00
interwiki Migrate usage of setMwGlobals() to overrideConfigValue(s) 2022-08-01 06:16:22 +01:00
jobqueue Replace trivial usages of code in strings with concatenation 2022-08-26 12:26:44 +00:00
language Migrate usage of setMwGlobals() to overrideConfigValue(s) 2022-08-01 06:16:22 +01:00
languages Use yield consistently in grammar tests 2022-06-03 14:52:53 +03:00
libs rdbms: Move Database::factory() to DatabaseFactory service 2022-08-31 10:53:50 +10:00
linkeddata Migrate usage of setMwGlobals() to overrideConfigValue(s) 2022-08-01 06:16:22 +01:00
linker tests: Add missing @group Database 2022-08-06 22:55:12 +02:00
logging tests: Migrate MediaWiki settings to overrideConfig...() 2022-08-18 17:48:03 +01:00
mail tests: Add missing @group Database 2022-08-06 22:55:12 +02:00
media Migrate usage of setMwGlobals() to overrideConfigValue(s) 2022-08-01 06:16:22 +01:00
Message
Navigation tests: don't assume wgLanguageCode is 'en' 2022-07-21 19:32:41 -04:00
objectcache SqlBagOStuff: Fix modtoken comparison 2022-08-19 11:11:58 +10:00
page ParserOutputAccessTest: Inline services & avoid creating variables 2022-09-01 22:25:22 +01:00
pager Replace trivial usa of mock builder with createMock() shortcut 2022-07-15 16:43:48 +00:00
ParamValidator/TypeDef tests: Add missing @group Database 2022-08-06 22:55:12 +02:00
parser Add support to enable Scribunto & Parsoid to handle nowikis properly 2022-09-01 21:04:42 +00:00
password Add convenience methods for asserting status. 2022-03-16 22:44:25 +01:00
Permissions tests: Remove resetServiceForTesting after overrideConfigValues 2022-07-27 23:08:27 +02:00
poolcounter Replace deprecated calls ParserOptions::newCanonical( 'canonical' ) 2022-06-16 14:22:24 +01:00
preferences Replace usage of User::getOption 2022-08-19 21:21:36 +02:00
rcfeed Migrate from setMwGlobals() to overrideConfigValue(s) 2022-08-02 10:14:10 +01:00
registration Collect autoloader info in ExtensionProcessor 2022-06-07 17:39:00 +02:00
ResourceLoader ResourceLoaderSkinModule: Split up interface feature into multiple parts 2022-08-24 13:59:17 +00:00
Rest REST: introduce getPrivateRouteUrl 2022-07-14 13:12:35 +00:00
Revision rdbms: remove getTopologyRootPrimary() and clean up related fields/parameters 2022-08-26 12:26:10 -07:00
search Migrate use of global to use of config settings 2022-08-12 12:25:17 +00:00
session Merge "Replace trivial usages of code in strings with concatenation" 2022-08-26 16:54:56 +00:00
shell Migrate use of global to use of config settings 2022-08-12 12:25:17 +00:00
site Migrate use of global to use of config settings 2022-08-12 12:25:17 +00:00
skins SkinTemplate: Unset modern menus in QuickTemplate-based skins 2022-08-31 23:39:54 +00:00
sparql Replace trivial usa of mock builder with createMock() shortcut 2022-07-15 16:43:48 +00:00
specialpage Migrate use of global to use of config settings 2022-08-12 12:25:17 +00:00
specials Avoid PHP 8.1 failures in SpecialPreferencesTest::testT43337 2022-08-29 22:37:22 +00:00
Storage Replace usage of User::getOption 2022-08-19 21:21:36 +02:00
title tests: Migrate away from setMwGlobals() to overrideConfigValue(s)() 2022-08-14 22:23:25 +01:00
upload tests: Migrate away from setMwGlobals() to overrideConfigValue(s)() 2022-08-14 22:23:25 +01:00
user tests: Migrate away from setMwGlobals() to overrideConfigValue(s)() 2022-08-14 22:23:25 +01:00
utils SQLPlatform: Introduce buildComparison() 2022-09-10 04:22:19 +02:00
watcheditem tests: Migrate away from setMwGlobals() to overrideConfigValue(s)() 2022-08-14 22:23:25 +01:00
ActorMigrationTest.php tests: Use namespaced IDatabase class 2022-05-28 00:09:55 +02:00
ActorMigrationTest.sql
AutoLoaderTest.php tests: Use overrideConfigValue(s) where necessary 2022-07-16 23:45:52 +01:00
CategoryTest.php tests: Use overrideConfigValue(s) where necessary 2022-07-16 23:45:52 +01:00
CommentStoreCommentTest.php
CommentStoreTest.php
CommentStoreTest.sql
ContentSecurityPolicyTest.php [php8.1] Change override of $wgResourceBasePath for CSP tests 2022-07-25 12:54:04 -07:00
EditPageConstraintsTest.php Merge "EditPage: Disentangle edit summary and section title" 2022-07-19 21:14:32 +00:00
EditPageTest.php tests: Use overrideConfigValue(s) where necessary 2022-07-16 23:45:52 +01:00
ExportTest.php tests: Use overrideConfigValue(s) where necessary 2022-07-16 23:45:52 +01:00
ExtraParserTest.php tests: Remove resetServiceForTesting after overrideConfigValues 2022-07-27 23:08:27 +02:00
FauxRequestTest.php tests: Use overrideConfigValue(s) where necessary 2022-07-16 23:45:52 +01:00
GitInfoTest.php tests: Use overrideConfigValue(s) where necessary 2022-07-16 23:45:52 +01:00
HooksTest.php
HtmlTest.php tests: Use overrideConfigValue(s) where necessary 2022-07-16 23:45:52 +01:00
LinkerTest.php tests: Migrate MediaWiki settings to overrideConfig...() 2022-08-18 17:48:03 +01:00
LinkFilterTest.php tests: Use overrideConfigValue(s) where necessary 2022-07-16 23:45:52 +01:00
MagicWordFactoryTest.php
MediaWikiServicesTest.php Replace trivial usa of mock builder with createMock() shortcut 2022-07-15 16:43:48 +00:00
MediaWikiTest.php tests: don't assume wgLanguageCode is 'en' 2022-07-21 19:32:41 -04:00
MediaWikiVersionFetcherTest.php
MergeHistoryTest.php tests: Use overrideConfigValue(s) where necessary 2022-07-16 23:45:52 +01:00
MessageTest.php tests: Use overrideConfigValue(s) where necessary 2022-07-16 23:45:52 +01:00
MockServiceWiring.php
MovePageTest.php Tests: Use createNoOpMock() shortcut in a few more places 2022-07-18 21:25:31 +00:00
MultiHttpClientTest.php Replace trivial usa of mock builder with createMock() shortcut 2022-07-15 16:43:48 +00:00
MWTimestampTest.php tests: Use overrideConfigValue(s) where necessary 2022-07-16 23:45:52 +01:00
OutputPageTest.php tests: Migrate MediaWiki settings to overrideConfig...() 2022-08-18 17:48:03 +01:00
PagePropsTest.php Hard deprecate PageProps::getInstance() 2022-03-15 22:58:48 +01:00
SampleTest.php tests: Use overrideConfigValue(s) where necessary 2022-07-16 23:45:52 +01:00
SiteStatsTest.php
StatusTest.php Make StatusValue accept MessageValue. 2022-09-01 09:00:21 +00:00
TemplateCategoriesTest.php tests: Make sure deferred updates are done and re-enable TemplateCategoriesTest 2022-03-17 13:01:08 +00:00
TestUser.php tests/api: Add TestUser::getAuthority and use it 2022-08-06 23:15:27 +02:00
TestUserRegistry.php
TimeAdjustTest.php tests: Use overrideConfigValue(s) where necessary 2022-07-16 23:45:52 +01:00
TitleTest.php Replace complicated setup with createNoOpMock() in TitleTest 2022-08-06 09:19:48 +00:00
TitleUrlTest.php tests: Use overrideConfig(Value|Values) where needed 2022-07-12 22:24:50 +00:00
TrackingCategoriesTest.php
WebRequestTest.php Support CDN query parameter re-ordering 2022-08-09 01:53:38 +00:00
WikiMapTest.php tests: Migrate MediaWiki settings to overrideConfig...() 2022-08-18 17:48:03 +01:00
XmlTest.php tests: don't assume wgLanguageCode is 'en' 2022-07-21 19:32:41 -04:00