WebApiExtension icon indicating copy to clipboard operation
WebApiExtension copied to clipboard

Response getter for WebApiExtension

Open vmanchev opened this issue 9 years ago • 4 comments

In order to add more step definitions, by extending the WebApiContext class, we need access to the response object. By default, the response property is defined with "private" visibility. We either need a getter or the visibility to be changed to protected. To keep the consistency, lets add a getter method.

vmanchev avatar Oct 22 '15 12:10 vmanchev

I'm -1 for adding a getter for this, as it would mean that the type of the Response becomes part of our API, and we cannot support Guzzle6 anymore (see https://github.com/Behat/WebApiExtension/pull/35)

stof avatar Oct 22 '15 13:10 stof

I understand that you want to be able to perform more assertions, but we first need to find the right architecture to expose things without making the maintenance a BC nightmare

stof avatar Oct 22 '15 13:10 stof

+1 for this. See my comment at https://github.com/Behat/WebApiExtension/pull/40

tchaffee avatar Nov 13 '15 14:11 tchaffee

Now that #35 was merged, can we come back to this issue? Making the response accessible in a subclass is really hacky at the moment.

anho avatar Apr 15 '16 21:04 anho