wiki.techinc.nl/tests/phpunit/includes
Roan Kattouw fbbd65d2df ResourceLoader: Add support for packageFiles
Package files are files that are part of a module, but are not
immediately executed when the module executes. Instead, they are
lazy-excecuted when require() is called on them. Package files can be
scripts (JS) or data (JSON), and can be real files on the file system,
or virtual files generated by a callback.

Using virtual data files, server-side data and config variables can be
bundled with a module. Support for file-based require() allows us to
import npm modules into ResourceLoader more easily.

The require function passed to each script execution context, which was
previously a reference to the global mw.loader.require() function, is
changed to one that is scoped to the module and the file being executed.
This is needed to support relative paths: require( '../foo.js' ) can
mean a different file depending on the path of the calling file.

The results of require()ing each file (i.e. the value of module.exports
after executing it) are stored, and calling require() on the same file a
second time won't execute it again, but will return the stored value.

Miscellaneous changes:
- Add XmlJsCode::encodeObject(), which combines an associative array of
  XmlJsCode objects into one larger XmlJsCode object. This is needed for
  encoding the packageFiles parameter in mw.loader.implement() calls.

Bug: T133462
Change-Id: I78cc86e626de0720397718cd2bed8ed279579112
2019-02-05 22:05:02 +00:00
..
actions Add PHPUnit tests for methods in ViewAction::class 2018-11-20 18:13:50 +01:00
api ApiQuerySiteinfoTest: Conversion of $wgContLang to service 2019-02-05 05:05:53 +01:00
auth Don't check anon permissions for maint scripts in autoCreateUser() 2019-01-24 17:45:10 -08:00
block Add NamespaceRestriction class so that BlockRestriction can handle namespaces. 2019-01-21 14:19:39 +00:00
cache messagecache: check overridable message array in getMsgFromNamespace() 2018-10-16 20:39:38 +00:00
changes
changetags Fix order of arguments in ChangeTags::getPrevTags 2019-01-09 10:14:40 +01:00
collation
composer
config Deprecate MediaWikiTestCase::stashMwGlobals 2018-10-07 19:39:47 +03:00
content Merge "Add some missing @covers tags" 2019-02-03 20:28:43 +00:00
context
db Add missing @covers to database related tests 2019-02-01 20:43:02 +00:00
debug Add missing @covers to backend related tests 2019-02-01 22:08:32 +01:00
deferred Require ClassMatchesFilename sniff to pass for most of tests/ 2019-01-29 23:57:12 -08:00
diff Merge "SlotDiffRenderer: add utility method for parameter type checks" 2018-10-13 05:27:16 +00:00
editpage
exception
externalstore
filebackend Remove a few obscure "done" and "empty" comments 2019-01-30 20:35:14 +00:00
filerepo Add missing property declarations to LocalFileTest 2019-01-02 15:25:44 +01:00
GlobalFunctions Use new externallinks.el_index_60 field 2018-11-12 22:33:18 +00:00
htmlform thiemowmde's legal name changed 2018-07-24 06:07:38 +00:00
http http: Support callback functions in GuzzleHttpRequest 2019-01-24 22:05:10 +00:00
import Add missing @covers to action related tests 2019-02-01 22:13:32 +01:00
installer
interwiki
jobqueue Merge "[MCR] Introduce SlotRoleHandler and SlotRoleRegistry" 2018-12-03 16:20:06 +00:00
json Finish FormatJson::encode() test coverage 2019-02-02 22:04:35 -08:00
libs objectcache: avoid occasional test flakiness due to microtime() 2019-02-04 21:35:42 -08:00
linkeddata
linker Clear the title cache in MutableRevisionRecordTest 2018-10-25 21:16:27 +00:00
logging Add namespace restrictions to block's log messages 2019-01-25 15:46:11 -05:00
mail
media Fix @param tags 2019-02-03 16:49:10 +01:00
objectcache
page Display translatable images in wiki language on image pages 2019-02-04 15:57:37 -08:00
pager
parser Add missing @covers to parser related tests 2019-02-01 21:15:40 +00:00
password Merge "Add some missing @covers tags" 2019-02-03 20:28:43 +00:00
poolcounter Require ClassMatchesFilename sniff to pass for most of tests/ 2019-01-29 23:57:12 -08:00
preferences test: disable hook when testing default preferences 2018-09-10 10:25:22 +02:00
rcfeed
registration registration: Allow overriding attributes in tests 2019-01-14 12:47:10 -08:00
resourceloader ResourceLoader: Add support for packageFiles 2019-02-05 22:05:02 +00:00
Revision Fix @param tags 2019-02-03 16:49:10 +01:00
search Add missing @covers to search related tests 2019-02-01 21:35:26 +00:00
session Add session_write_close() calls to SessionManager tests 2018-10-16 10:22:33 -04:00
shell Remove excessive indenting of parameters on newlines 2018-11-06 10:57:17 +00:00
site Add missing @covers to backend related tests 2019-02-01 22:08:32 +01:00
skins
sparql build: Updating mediawiki/mediawiki-codesniffer to 22.0.0 2018-09-16 15:51:11 +00:00
specialpage No yoda conditions 2018-11-21 17:54:39 +01:00
specials Merge "Add missing @covers to search related tests" 2019-02-02 23:39:32 +00:00
Storage Fix @param tags 2019-02-03 16:49:10 +01:00
tidy RemexCompatMunger: Don't split p-wrapping on style/link tags 2019-01-30 09:10:24 -08:00
title TitleFormatter: Implement fbc1449653 and unify prefix logic 2018-08-17 17:43:52 -07:00
upload Add missing empty lines between methods 2019-01-15 19:14:35 +00:00
user Add missing @covers to user related tests 2019-02-01 21:16:13 +00:00
utils Better detection for old MS Office files 2019-01-23 09:23:17 +11:00
watcheditem Watchlist: Commit after each batch watchlist insertion and removal 2018-10-18 14:33:50 -04:00
ActorMigrationTest.php ActorMigration: Remove possibility of read-both 2018-10-11 12:12:00 +11:00
AutoLoaderTest.php
AutopromoteTest.php
BlockTest.php Add NamespaceRestriction class so that BlockRestriction can handle namespaces. 2019-01-21 14:19:39 +00:00
CommentStoreTest.php Drop the image_comment_temp table 2018-11-14 15:04:31 -05:00
ContentSecurityPolicyTest.php CSP: In tests, use setMwGlobals() instead of manual set+undo 2018-08-19 01:43:52 +01:00
DeprecatedGlobalTest.php
DerivativeRequestTest.php Fix IP handling in DerivativeRequest 2018-10-31 20:34:58 -07:00
DiffHistoryBlobTest.php
EditPageTest.php Add missing @covers to action related tests 2019-02-01 22:13:32 +01:00
ExportTest.php Mass conversion of $wgContLang to service 2018-08-11 22:44:29 -06:00
ExtraParserTest.php During special page transclusion, save and restore context's WikiPage too 2018-10-19 22:19:52 +02:00
FauxRequestTest.php
FauxResponseTest.php
FormOptionsInitializationTest.php Use TestingAccessWrapper in FormOptionsInitializationTest 2019-01-29 21:33:42 -08:00
FormOptionsTest.php
GitInfoTest.php Allow tests to run with a non-writable source tree 2018-08-30 10:48:50 +10:00
HooksTest.php Drop wfRunHooks, deprecated since 1.25 2018-10-10 15:30:00 -07:00
HtmlTest.php Add warning if you give Html::openElement a name with a space 2018-12-20 18:03:56 -08:00
LicensesTest.php
LinkerTest.php Don't link wikilinks in section heading autocomments 2018-12-03 12:43:03 -08:00
LinkFilterTest.php Use new externallinks.el_index_60 field 2018-11-12 22:33:18 +00:00
ListToggleTest.php
MagicWordFactoryTest.php MagicWordFactory: Follow-up on I5d2166f155e31900cb40c 2018-12-18 12:12:39 +01:00
MediaWikiServicesTest.php Fully extract services framework as a library 2019-01-16 17:31:05 +01:00
MediaWikiTest.php Add @coversNothing for left over tests and enable sniff 2019-02-02 21:53:40 -08:00
MediaWikiVersionFetcherTest.php Improve MediaWikiVersionFetcherTest 2018-08-10 11:26:57 +03:00
MergeHistoryTest.php MergeHistory: Fix flaky test due to relative timestamp 2018-08-15 02:16:02 +01:00
MessageTest.php Add some missing @covers tags 2019-02-02 21:53:40 -08:00
MovePageTest.php Add missing @covers to action related tests 2019-02-01 22:13:32 +01:00
MultiHttpClientTest.php Added non-parallel fallback to MultiHttpClient when curl is unavailable 2018-07-23 00:19:59 +00:00
MWNamespaceTest.php
MWTimestampTest.php
OutputPageTest.php Fix @param tags 2019-02-03 16:49:10 +01:00
PagePropsTest.php Automatically reset namespace caches when needed 2018-08-01 16:30:08 +03:00
PathRouterTest.php Avoid a redirect loop when the request URL is not normalized 2018-07-16 15:55:59 +10:00
PrefixSearchTest.php Reset services before every test 2018-09-03 16:38:58 +00:00
ReadOnlyModeTest.php
RevisionDbTestBase.php Remove Revision::fetchRevision() 2019-01-30 15:43:30 -08:00
RevisionMcrDbTest.php Allow getRevisionText to function without the text table. 2018-10-17 10:54:39 -04:00
RevisionMcrReadNewDbTest.php Allow getRevisionText to function without the text table. 2018-10-17 10:54:39 -04:00
RevisionMcrWriteBothDbTest.php Re-namespace RevisionStore and RevisionRecord classes 2018-10-09 10:22:48 -04:00
RevisionNoContentModelDbTest.php Re-namespace RevisionStore and RevisionRecord classes 2018-10-09 10:22:48 -04:00
RevisionPreMcrDbTest.php Re-namespace RevisionStore and RevisionRecord classes 2018-10-09 10:22:48 -04:00
RevisionTest.php Merge "No yoda conditions" 2018-12-09 01:34:23 +00:00
RevisionTestModifyableContent.php
RevisionTestModifyableContentHandler.php
SampleTest.php Fix typo in tests/includes/SampleTest.php in core 2018-11-02 12:55:09 +00:00
SanitizerValidateEmailTest.php
ServiceWiringTest.php Alphabetize service lists 2018-08-09 22:19:58 -06:00
SiteConfigurationTest.php
SiteStatsTest.php
StatusTest.php
TemplateCategoriesTest.php
TemplateParserTest.php TemplateParser: Pass FLAG_MUSTACHELOOKUP to enable parent context access 2018-09-04 12:39:34 -07:00
TestLogger.php
TestUser.php Password: replace equals() with verify() 2019-01-24 13:40:40 -08:00
TestUserRegistry.php tests: Allow string to be passed to getTestUser() etc. 2018-10-04 15:30:47 +00:00
TimeAdjustTest.php Mass conversion of $wgContLang to service 2018-08-11 22:44:29 -06:00
TitleArrayFromResultTest.php
TitleMethodsTest.php Fix Title::getFragmentForURL for bad interwiki prefix. 2019-01-23 11:17:21 +01:00
TitlePermissionTest.php Revert "Revert "Title::checkUserBlock should call User::isBlockedFrom for every action"" 2019-01-07 09:40:12 -05:00
TitleTest.php Title: Fix isRawHtmlMessage() for messages with underscores 2018-08-31 09:45:01 -07:00
WebRequestTest.php WebRequest: Fix flaky testGetElapsedTime test case 2018-07-16 20:23:30 -07:00
WikiMapTest.php Use DB domain in JobQueueGroup and make WikiMap domain ID methods stricter 2018-11-07 04:46:56 +00:00
WikiReferenceTest.php
XmlJsTest.php
XmlSelectTest.php
XmlTest.php ResourceLoader: Add support for packageFiles 2019-02-05 22:05:02 +00:00