wiki.techinc.nl/tests/phpunit/includes/ResourceLoader
Tim Starling a59c446154 ResourceLoader: Allow FileModule scripts to be generated with a callback
To implement source maps, we want FileModule::getScript() to return
an array with path information, but that would break subclasses of
FileModule which concatenate to the return value of parent::getScript().
So allow scripts to be generated by a callback, eliminating the need for
concatenation in subclasses.

* Factor out most of the loop body of expandPackageFiles() into
  expandFileInfo(). Add 'name' to the return value. Ensure 'filePath'
  is always a FilePath object since we need that to safely return it
  to ResourceLoader later. Document the return value.
* Make sure the base path is always set in FilePath objects returned by
  expandFileInfo().
* Factor out the loop body of the final stage of file info expansion
  into readFileInfo(). Retain filePath, do not unset it.
* Assert that $fileInfo['content'] is definitely set.
* Convert array_map() in getDefinitionSummary() to a loop.
* Migrate LanguageDataModule.

Bug: T47514
Change-Id: I97d61b5793159cea365740e0563f7b733e0f16de
2023-05-09 11:47:40 +10:00
..
templates ResourceLoader namespace (attempt 2) 2022-05-24 15:41:46 +00:00
ClientHtmlTest.php HTML: Remove self-closing XHTML syntax from core 2023-05-03 10:44:41 +02:00
ContextTest.php build: Updating mediawiki/mediawiki-codesniffer to 41.0.0 2023-03-11 19:04:09 +00:00
DerivativeContextTest.php build: Updating mediawiki/mediawiki-codesniffer to 41.0.0 2023-03-11 19:04:09 +00:00
FileModuleTest.php ResourceLoader: Allow FileModule scripts to be generated with a callback 2023-05-09 11:47:40 +10:00
ImageModuleTest.php ResourceLoader: tweak comments and error messages 2023-04-03 18:21:30 +10:00
LessVarFileModuleTest.php ResourceLoader: Hoist and simplify @covers in test cases 2022-08-23 23:59:17 +00:00
MessageBlobStoreTest.php objectcache: Remove $wgMainWANCache and $wgWANObjectCaches 2023-03-07 22:47:04 +00:00
ModuleTest.php ResourceLoader: Hoist and simplify @covers in test cases 2022-08-23 23:59:17 +00:00
OOUIImageModuleTest.php ResourceLoader: Remove SVG fallback hack from ImageModule 2023-02-08 01:32:07 +01:00
ResourceLoaderTest.php ResourceLoader: Avoid new use of MWException 2023-04-10 18:47:45 -07:00
SkinModuleTest.php ResourceLoader: tweak comments and error messages 2023-04-03 18:21:30 +10:00
StartUpModuleTest.php ResourceLoader: Raise MW JavaScript startup requirement to ES6 2023-03-30 14:26:05 +01:00
UserOptionsModuleTest.php ResourceLoader namespace (attempt 2) 2022-05-24 15:41:46 +00:00
WikiModuleTest.php Reorg: Namespace the Title class 2023-03-02 08:46:53 -05:00