Behat / WebApiExtension

Behat extension to test web APIs
http://extensions.behat.org
MIT License
111 stars 114 forks source link

Response getter for WebApiExtension #39

Open vmanchev opened 8 years ago

vmanchev commented 8 years ago

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.

stof commented 8 years ago

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 commented 8 years ago

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

tchaffee commented 8 years ago

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

anho commented 8 years ago

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.