Follows-up 1ac5474b7b and d18d030d57.
* Always mock WebRequest in WebRequestTest.
Avoid using FauxRequest, can easily cause false positives (it's already
avoided in one case of that reason).
* Add a few smoke/integration tests in FauxRequest to make sure the parent
methods work as expected, given the internal method being overridden
in FauxRequest.
Change-Id: I1bf528f3c578ecb171a3ff4f17b26f9bb02b4f47
* Remove @covers for methods that don't exist (parent class).
* Fix coverage for initHeaders() and setHeaders().
* Add tests and coverage for all other methods.
Change-Id: Id9b6de31843d2e87c54f485beb4fbcbe6f4bf8f6
Actually override initHeaders to avoid init of the header, if no header
was set.
The tests was taken from I4c06369968e.
Follows-up 578a0c082f.
Change-Id: I86b2a9bae2f5938374fd9e5e46997c3fdfe87e39
* Add a stub FauxRequest::initHeaders method. This allows FauxRequest to
use WebRequest's getHeader implemention, leading to less code duplication.
* Add an optional $flags parameter to WebRequest::getHeader. When the flag
WebRequest::GETHEADER_LIST is set, treat the header as a comma-separated
list of values (per RFC 2616 § 4.2) and return an array.
(Initial use-case: Ibb292d241's treatment of If-None-Match header.)
* Add test.
See <http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html>.
Change-Id: I2760f57adfa7b886c84044a6e9348a47ac307229
HTTP headers are case insensitive per spec, and WebRequest
treats them like that, so FauxRequest should too.
Change-Id: I4257af7a8de2792ac556c670dcc7f28e4af4cb44