Skip to content

Conversation

@dbu
Copy link
Contributor

@dbu dbu commented Aug 2, 2014

i tried to trigger the guzzle exception handling we have. code coverage indicates we never see a RequestException in the handleException method. however, i was not able to ever produce that exception. any ideas what we could do? or can we simply drop that excpetion? or am i just confused?

nevermind the code in this PR, i have left all kind of debugging and experimenting stuff lying around.

@ddeboer
Copy link
Member

ddeboer commented Aug 2, 2014

Guzzle will throw a RequestException for 50*s, for instance. So if Varnish is configured to throw a 501 Not Implemented when receiving a BAN (maybe if you want to make clear that the proxy is not configured for banning), this will be come a RequestException. Does that help?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure if this really is a good idea, but saw that this is the base class. the ClientInterface does not explain what exceptions to expect.

@dbu
Copy link
Contributor Author

dbu commented Aug 5, 2014

okay, i think this is now good. except for #109 and a phpunit bug with showing interfaces as covered the coverage now looks really good.

ddeboer added a commit that referenced this pull request Aug 5, 2014
@ddeboer ddeboer merged commit fb6fbe9 into master Aug 5, 2014
@ddeboer ddeboer deleted the test-exception branch August 5, 2014 18:44
@ddeboer
Copy link
Member

ddeboer commented Aug 5, 2014

Yeah, look at that coverage! :)

Do we need to do anything to get the PHPUnit coverage right, like switching /* to /**?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should not die

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ups. leftover debug code that is never triggered when the implementation behaves as expected. fixed in 8a84260

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants