wiki.techinc.nl/tests/phpunit/includes
Bartosz Dziewoński 68e495d8b0 ApiMain: Add support for assert=anon
In VisualEditor, when the user is saving their edit, we want to ensure
that they understand how their edit will be attributed. Therefore, if
the user gets logged out or logs in in another tab, we want to display
a message about it before saving.

We've been detecting this situation by manually managing tokens and
handling the 'badtoken' error, but our code would be much simpler and
it would be possible to share it with other extensions if we could
instead rely on automatic retrying in mw.Api#postWithToken and use
'assertuser' and 'assert' parameters. 'assert=anon' is the only
feature we're missing.

Bug: T245327
Change-Id: I485f99e1f5f493262b0c9af22370da01adf1e09c
2020-02-19 22:37:31 +01:00
..
actions Manual fix of the remaining assertInternalType & Co. 2019-12-15 00:20:10 +00:00
api ApiMain: Add support for assert=anon 2020-02-19 22:37:31 +01:00
auth Use dependency injection for AuthManager and allow it for providers 2020-02-19 01:18:16 -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 Follow-up Ifa346c8a92: LanguageNameUtils: CONSTRUCTOR_OTPIONS, not constructorOptions 2019-10-10 17:01:49 -07:00
content Use ObjectFactory to construct ContentHandlers 2020-02-10 21:36:36 +03:00
context Coding style: Auto-fix MediaWiki.Usage.PHPUnit* 2020-01-10 10:17:12 +00:00
db rdbms: dependency inject domain aliases into LBFactory 2020-02-15 22:34:38 +00:00
debug parser: Inject a LanguageConverterFactory through DI containers: 2020-02-04 14:42:03 +02: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 HTMLForm: Allow status object to have raw parameters 2020-02-09 18:06:12 +01: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 Move UIDGenerator code to a service and put it under /libs 2020-02-18 00:20:40 +00:00
language languages: Introduce LanguageConverterFactory 2020-02-03 11:38:03 +02:00
libs Move UIDGenerator code to a service and put it under /libs 2020-02-18 00:20:40 +00: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 Merge "Remove ArticleContentViewCustom hook, deprecated and unused" 2020-02-13 05:13:11 +00:00
pager tests: Replace PHPUnit's loose assertEquals(null) with assertNull() 2019-09-27 19:15:38 +00:00
ParamValidator/TypeDef Move some validation logic from ApiStructureTest to ParamValidator 2020-02-04 20:29:35 +00:00
parser Merge "Follow-up 0437877: SanitizerTest: Fix whitespace, test false state too" 2020-02-19 21:26:18 +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 Introduce ContentHandlerFactory 2020-02-07 00:53:51 +03:00
poolcounter Fixes for PHPUnit 8 compat in DB suite 2019-12-15 00:27:54 +00:00
preferences parser: Inject a LanguageConverterFactory through DI containers: 2020-02-04 14:42:03 +02:00
rcfeed tests: Add explicit return type void to setUp() and tearDown() 2019-10-30 14:31:22 -07:00
registration registration: Cache lazy-loaded attributes and make easier to use 2020-02-17 22:18:10 -08:00
resourceloader resourceloader: Dependency inject WANObjectCache into MessageBlobStore 2020-02-12 22:16:42 +00:00
Rest Add Content-Type to Headers 2020-02-14 14:22:03 -05:00
Revision rdbms: dependency inject domain aliases into LBFactory 2020-02-15 22:34:38 +00:00
search search engine: Add tests for SearchNearMatcher 2020-02-13 10:41:34 +02: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 Merge "EditWatchlist: Use dependency injection for WatchedItemStore" 2020-02-07 08:54:44 +00:00
Storage Merge "BlobStore: support "known bad" addresses." 2020-02-06 15:56:05 +00: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 Merge "Add more tests for the user class" 2020-02-18 20:34:59 +00:00
utils Move UIDGenerator code to a service and put it under /libs 2020-02-18 00:20:40 +00: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 Kill the remaining usages of PHPUnit4And6Compat methods 2019-10-06 10:12:54 +00:00
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 Add object-src 'none' to MW CSP directive (configurable) 2020-02-18 16:20:56 -08: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 Introduce ContentHandlerFactory 2020-02-07 00:53:51 +03: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 resourceloader: support tracking indirect module dependency paths via BagOStuff 2020-02-13 17:26:36 +00: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 Merge "Tests: pass a $user to Revision::newNullRevision & Wikipage::getContent" 2020-02-13 01:26:03 +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 Introduce ContentHandlerFactory 2020-02-07 00:53:51 +03: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 Add public as visibility in tests folder 2019-10-10 21:55:37 +02:00
StatusTest.php Autofix 94 PHPUnit 8 compat issues 2019-12-13 15:29:10 +01:00
SystemBlockTest.php
TemplateCategoriesTest.php
TemplateParserTest.php TemplateParserTest: Add test case with syntax error 2020-01-29 23:15:53 +00:00
TestLocalisationCache.php Make LocalisationCache a service 2019-10-07 13:18:47 -07:00
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