resourceloader: Simplify load.mock.php by removing includes dependency
authorTimo Tijhof <krinklemail@gmail.com>
Thu, 1 Mar 2018 01:45:45 +0000 (17:45 -0800)
committerTimo Tijhof <krinklemail@gmail.com>
Tue, 6 Mar 2018 23:59:13 +0000 (15:59 -0800)
commit870d3a6532e66ecfa1fb1127b44fed20cc152570
tree04a1a8d14ba466e4262853550fc3fa1ba536d8d7
parentdc8550ea24cd80eb2cca16a8de51ab1be5ca0e31
resourceloader: Simplify load.mock.php by removing includes dependency

It previously depended on Xml.php for Xml::encodeJsCall, which
in turn depends on FormatJson. Other Xml.php methods also depend
on Sanitizer, but that was carefully not triggered.

Avoid both of these by simply constructing the string inline,
and using json_encode() directly for the one variable parameter.

Also, fix the names of one of the ResourceLoaderTest cases for
dotless module names. It claims to have been added to cover a
regression fixed in r88706, but that commit seems rather unrelated.
A bit of searching revealed as the relevant commit instead.

Bug: T188076
Change-Id: I04851d0355227f3a6b79b8d41a51d4beadce0e80
tests/phpunit/includes/resourceloader/ResourceLoaderTest.php
tests/qunit/data/load.mock.php