Behat/Mink — Issue #140: Goutte driver - cookie url decode problem
Author: noone225
Created: 2011-12-02 11:06:55+00:00
State: open

With Goutte driver, cookie values are not properly url decoded.

cookie_test.feature

```
Feature: Cookie url decoding

Scenario: Urlencode test
Given I am on "/a.php"
And I fill in "some:value;" for "cookie_value"
When I press "Set cookie"
And I go to "/a.php?show_value"
Then print last response
And I should see "some:value;"
```

a.php

```php
if (!empty($_POST)) {
setcookie ("tc", $_POST['cookie_value']);
}
else if (isset($_GET["show_value"])) {
echo $_COOKIE["tc"];
die();
} ?>

```

Result:

```
Feature: Cookie url decoding

Scenario: Urlencode test # cookie_test.feature:3
Given I am on "/a.php" # FeatureContext::visit()
And I fill in "some:value;" for "cookie_value" # FeatureContext::fillField()
When I press "Set cookie" # FeatureContext::pressButton()
And I go to "/a.php?show_value" # FeatureContext::visit()

| a.php?show_value
|
| some%3Avalue%3B

Then print last response # FeatureContext::printLastResponse()
And I should see "some:value;" # FeatureContext::assertPageContainsText()
The text "some:value;" was not found anywhere in the text of the current page
```