Skip to content
This repository has been archived by the owner on Apr 20, 2021. It is now read-only.

Header browserkit driver #75

Closed
wants to merge 1 commit into from

Conversation

stephpy
Copy link
Contributor

@stephpy stephpy commented Jun 3, 2014

With "behat/mink-browserkit-driver": "~1.2@dev" and this change https://github.com/Behat/MinkBrowserKitDriver/pull/53.

Headers setted here are stored on Behat\Mink\Driver\BrowserKitDriver and no more on client.

BTW, when we try to make a request from behatch/rest-context, there is no headers given to the request (since it not uses visit method of Behat\Mink\Driver\BrowserKitDriver).

I add a stack of headers on this context but a getter getServerParameterson Behat\Mink\Driver\BrowserKitDriver would be better imho. Any idea about this ? ping @stof @sanpii

ps: This PR is only for users which uses behat/mink-browserkit-driver: ~1.2@dev so we should not merge it NOW (before mink-browserkit-driver is released)

…hem when reset/restart session. They are on Behat\Mink\Driver\BrowserKitDriver and there is no way to get them.
@stof
Copy link
Contributor

stof commented Jun 3, 2014

The rest-context is a huge mistake altogether. Mink is not a REST client (browsers are not REST clients either). There is no point using the Mink driver to perform the REST API calls. It is the wrong tool for the job.

@bendavies
Copy link
Contributor

@stof what would be your preferred method of testing a restful API?

@stof
Copy link
Contributor

stof commented Jun 4, 2014

use theWebApiContext from Behat's CommonContexts repo for Behat 2.5 and the WebApiExtension or the RestExtension for Behat 3 (they should get merged together once I get some time to work on this again). They are all using an HTTP client (Buzz or Guzzle) to perform API calls rather than using Mink

@tyx
Copy link
Contributor

tyx commented Sep 1, 2014

The current main problem of WebApiContext(Behat 2 or 3) is the impossibility to use the JsonContext with it and we find it very useful in our team.

In order to go in this direction, I proposed this PR:
#82

@shouze
Copy link

shouze commented Dec 29, 2014

@stof totally agree with you... but it's a question of reality vs pragmatism. The merge of this PR would be very helpful to help making a smooth transition to modern REST extensions.

@stephpy
Copy link
Contributor Author

stephpy commented Dec 29, 2014

👍

@shouze
Copy link

shouze commented Dec 29, 2014

ping @sanpii for dev-behat-3.x?

@sanpii
Copy link
Member

sanpii commented Dec 29, 2014

ping @sanpii for dev-behat-3.x?

This PR is for the behat-2.x branch. I can also embed in master (except if I miss something).

@sanpii sanpii added this to the 2.3 milestone Dec 29, 2014
@shouze
Copy link

shouze commented Dec 29, 2014

@sanpii ok, would be very helpful if you merge it today.

@shouze
Copy link

shouze commented Dec 29, 2014

@sanpii just tell us, we can make a PR for another branch if you will.

@sanpii
Copy link
Member

sanpii commented Dec 29, 2014

Done, in behat-2.x and master.

@sanpii sanpii closed this Dec 29, 2014
@shouze
Copy link

shouze commented Dec 29, 2014

👍

@stephpy
Copy link
Contributor Author

stephpy commented Dec 29, 2014

Thanks. :)

@stephpy stephpy deleted the header_browserkit_driver branch December 29, 2014 19:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants