wiki.techinc.nl/tests/phpunit/includes/resourceloader
Timo Tijhof c0c221bfe4 resourceloader: Refactor empty value trimming for mw.loader.register
We already did this, but it was rather convoluted with lots of
if/elseif sequences checking all the possible values.

Remove this logic from ResourceLoaderStartUpModule. Simplying it
simply create the array and pass it to ResourceLoader::makeLoaderRegisterScript.

In makeLoaderRegisterScript, we apply a filter to the array(s) that
trim empty values.

While at it:
* As with other registration properties' default values (like for dependencies,
  group, and skip) also use 'null' for the default value of 'source'.
  The mediawiki.js client was already compatible with this, and the server omitted
  it if it was the last value in the list. But in all other cases it explicitly
  outputs "local". Use null instead of simplicity sake. This also gains us a
  few characters in the output, and a relatively larger win after gzip since
  there's lots more re-using of "null".
* Remove stray casting of $version to int. This only happened in case of
  registering a single module (which don't do anywhere), and is redundant.

Change-Id: I1f321e7b8bd3b5cffc550b51169957a3da9b971d
2014-12-09 00:47:14 +00:00
..
templates resourceloader: Add support for delivering templates 2014-10-29 19:31:16 +00:00
ResourceLoaderFileModuleTest.php resourceloader: Add support for delivering templates 2014-10-29 19:31:16 +00:00
ResourceLoaderModuleTest.php Move tests into separate ResourceLoaderFileModuleTest 2014-10-22 17:16:47 +00:00
ResourceLoaderStartupModuleTest.php resourceloader: Refactor empty value trimming for mw.loader.register 2014-12-09 00:47:14 +00:00
ResourceLoaderTest.php Refactor hook handling in ResourceLoaderTest 2014-10-23 19:19:18 +00:00
ResourceLoaderWikiModuleTest.php test: Clean up data providers that should be static 2014-09-18 12:52:44 -07:00