zendframework/zf2 — pull request #764 by cgdangelo (2012-02-01 06:24:29+00:00)
Title: Fixes for [Zend\GData\YouTube] and [Zend\Http\Client]

[Zend\GData\YouTube] changes

* Fixed malformed arguments being passed to Client::setHeaders()

[Zend\Http\Client] changes

* Fixed setHeaders() method so that it doesn't instantiate a new Headers object in every call

---

Currently, ZendTest\GData\YouTubeTest::testSetClientIDAndDeveloperKeyHeader fails due to a Zend\Http\Exception\InvalidArgumentException. Two arguments are being passed to Client::setHeaders(); changing to a single Array argument fixes this problem.

Once this is done, the same test fails due to another Zend\Http\Exception\InvalidArgumentException. I noticed that the User-Agent was the last header to be set and the only one that stayed in the object. A new Headers object was being created every time Zend\Http\Client::setHeaders() was called so everything was being overwritten.

After fixing these two issues, the test is passed.