How to test Guzzle event in PHPUnit
I am having trouble understanding how I should go about unit testing a
method which utilizes \Guzzle\Common\Event and has no return. I have a
function
public function setRequest(\Guzzle\Common\Event $e) {
$e['request']->getQuery()->set('key', $this->getKey());
}
I cannot get the methods described at Guzzles mock object documentation to
produce a successful test. What all needs to be mocked for this to work?
getQuery() is part of the \Guzzle\Http\Message\Request I guess? What about
the set()?
No comments:
Post a Comment