WebRequest: Add more unit tests
authorTimo Tijhof <krinklemail@gmail.com>
Fri, 9 Sep 2016 04:58:09 +0000 (21:58 -0700)
committerTimo Tijhof <krinklemail@gmail.com>
Fri, 9 Sep 2016 04:58:09 +0000 (21:58 -0700)
commit1ac5474b7b62fc03f491d77d2f7127655b36aaa5
tree0b28c3a487d176d9006c73932ed3c35c0dae5cc7
parentd18d030d57b88e190a87c50aeccf694986a800f7
WebRequest: Add more unit tests

* Complete detectServer() coverage,
  test $wgAssumeProxiesUseDefaultProtocolPorts.
* Complete getAcceptLang() coverage.
* Add tests for getGPCVal() normalisation.
* Add tests for other getter methods.

Also:

* Ignore __construct() coverage as it only sets up properties from
  global state. The use of those properties are covered.

* Make normalizeUnicode() visibility explicit.

Change-Id: I6504136e6df47e504bc2e0e91fedddd2625f19d9
includes/WebRequest.php
tests/phpunit/includes/WebRequestTest.php