mediawiki.cookie: Export config via packageFiles
authorTimo Tijhof <krinklemail@gmail.com>
Sat, 9 Mar 2019 02:46:38 +0000 (02:46 +0000)
committerAaron Schulz <aschulz@wikimedia.org>
Sun, 10 Mar 2019 00:22:41 +0000 (00:22 +0000)
commita0370fe3c9587f5c1ba0a366fd8045e987d61ddb
tree67fd1de539a3b166ca42cd8402923f56035d976a
parentf1644aa1b0dd5a51c990907d3658ea9c33ec0dce
mediawiki.cookie: Export config via packageFiles

* Add a private setDefaults() method to allow mocking from
  unit tests.

* Use matching keys between the data export and the API.

* Reduce duplication in the code.

* Access the Sinon stub explicitly instead of via the public path.

* Remove use of the now-redundant QUnit.newMwEnvironment().

Change-Id: I600332cdb738f0b443549948b9f070f3ccfa12aa
resources/Resources.php
resources/src/mediawiki.cookie/index.js
tests/qunit/suites/resources/mediawiki/mediawiki.cookie.test.js