Skip to content

Commit 4ca3441

Browse files
committed
Remove Goutte
1 parent a068e5c commit 4ca3441

File tree

4 files changed

+15
-51
lines changed

4 files changed

+15
-51
lines changed

behat.yml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ default:
88
base_url: http://en.wikipedia.org/
99
sessions:
1010
default:
11-
goutte: ~
11+
browserkit_http: ~

doc/index.rst

Lines changed: 9 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ The easiest way to keep your suite updated is to use `Composer <http://getcompos
3636

3737
.. code-block:: bash
3838
39-
$ composer require --dev behat/mink-extension
39+
$ composer require --dev friends-of-behat/mink-extension
4040
4141
2. Activate the extension by specifying its class in your ``behat.yml``:
4242

@@ -50,7 +50,7 @@ The easiest way to keep your suite updated is to use `Composer <http://getcompos
5050
base_url: 'http://example.com'
5151
sessions:
5252
default:
53-
goutte: ~
53+
browserkit_http: ~
5454
5555
Usage
5656
-----
@@ -143,7 +143,7 @@ will need to choose the driver you want to use.
143143
first_session:
144144
selenium2: ~
145145
second_session:
146-
goutte: ~
146+
browserkit_http: ~
147147
third_session:
148148
selenium2: ~
149149
@@ -171,16 +171,16 @@ session using a javascript driver in the order of the configuration (it would
171171
be ``first_session`` in the example above as ``selenium2`` supports Javascript).
172172
If it is not configured explicitly, the default session is set to the first
173173
session using a non-javascript driver if any, or to the first javascript session
174-
otherwise (it would be ``second_session`` above as ``goutte`` does not support
174+
otherwise (it would be ``second_session`` above as ``browserkit_http`` does not support
175175
javascript).
176176

177177
Drivers
178178
~~~~~~~
179179

180180
First of all, there are drivers enabling configuration. MinkExtension comes
181-
with support for 7 drivers out of the box:
181+
with support for different drivers.
182182

183-
* ``GoutteDriver`` - headless driver without JavaScript support. In order to use
183+
* ``BrowserKitDriver`` - headless driver without JavaScript support. In order to use
184184
it, modify your ``behat.yml`` profile:
185185

186186
.. code-block:: yaml
@@ -190,38 +190,7 @@ with support for 7 drivers out of the box:
190190
Behat\MinkExtension:
191191
sessions:
192192
my_session:
193-
goutte: ~
194-
195-
.. Tips : HTTPS and self-signed certificate
196-
If you use Behat/Mink/Goutte to test your application, and want to test an
197-
application secured with HTTPS, but with a self-signed certificate, you can use
198-
the following parameters to avoid the validation error triggered by Guzzle:
199-
200-
* For ``Guzzle 4`` or later:
201-
202-
.. code-block:: yaml
203-
204-
default:
205-
extensions:
206-
Behat\MinkExtension:
207-
sessions:
208-
my_session:
209-
goutte:
210-
guzzle_parameters:
211-
verify: false
212-
213-
* For ``Guzzle 3`` or earlier:
214-
215-
.. code-block:: yaml
216-
217-
default:
218-
extensions:
219-
Behat\MinkExtension:
220-
sessions:
221-
my_session:
222-
goutte:
223-
guzzle_parameters:
224-
ssl.certificate_authority: false
193+
browserkit_http: ~
225194
226195
* ``Selenium2Driver`` - javascript driver. In order to use it, modify your
227196
``behat.yml`` profile:
@@ -301,12 +270,9 @@ with support for 7 drivers out of the box:
301270
302271
.. note::
303272

304-
The phar version of Mink comes bundled with all 5 drivers and you don't need to do
305-
anything except enabling them in order to use them.
273+
You need to install drivers that you need through Composer:
306274

307-
But if you're using Composer, you need to install drivers that you need first:
308-
309-
- GoutteDriver - ``behat/mink-goutte-driver``
275+
- BrowserKitDriver - ``behat/mink-browserkit-driver``
310276
- SeleniumDriver - ``behat/mink-selenium-driver``
311277
- Selenium2Driver (also used for SauceLabs and BrowserStack) - ``behat/mink-selenium2-driver``
312278
- SahiDriver - ``behat/mink-sahi-driver``

spec/Behat/MinkExtension/Listener/SessionsListenerSpec.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class SessionsListenerSpec extends ObjectBehavior
1515
{
1616
function let(Mink $mink, ScenarioTested $event, FeatureNode $feature, ScenarioNode $scenario, Suite $suite)
1717
{
18-
$this->beConstructedWith($mink, 'goutte', 'selenium2', array('selenium2', 'sahi'));
18+
$this->beConstructedWith($mink, 'browserkit_http', 'selenium2', array('selenium2', 'sahi'));
1919

2020
$event->getSuite()->willReturn($suite);
2121
$event->getFeature()->willReturn($feature);
@@ -38,7 +38,7 @@ function it_is_an_event_subscriber()
3838
function it_resets_the_default_session_before_scenarios($event, $mink)
3939
{
4040
$mink->resetSessions()->shouldBeCalled();
41-
$mink->setDefaultSessionName('goutte')->shouldBeCalled();
41+
$mink->setDefaultSessionName('browserkit_http')->shouldBeCalled();
4242

4343
$this->prepareDefaultMinkSession($event);
4444
}
@@ -120,7 +120,7 @@ function it_fails_for_invalid_javascript_suite_session($event, $scenario, $suite
120120
function it_fails_when_the_javascript_session_is_used_but_not_defined($event, $mink, $feature, $suite)
121121
{
122122
$suite->hasSetting('mink_javascript_session')->willReturn(false);
123-
$this->beConstructedWith($mink, 'goutte', null);
123+
$this->beConstructedWith($mink, 'browserkit_http', null);
124124
$feature->getTags()->willReturn(array('javascript'));
125125

126126
$this->shouldThrow(new ProcessingException('The @javascript tag cannot be used without enabling a javascript session'))
@@ -151,7 +151,7 @@ function it_stops_the_sessions_for_insulated_scenarios($event, $mink, $scenario)
151151
{
152152
$scenario->hasTag('insulated')->willReturn(true);
153153
$mink->stopSessions()->shouldBeCalled();
154-
$mink->setDefaultSessionName('goutte')->shouldBeCalled();
154+
$mink->setDefaultSessionName('browserkit_http')->shouldBeCalled();
155155

156156
$this->prepareDefaultMinkSession($event);
157157
}
@@ -160,7 +160,7 @@ function it_stops_the_sessions_for_insulated_features($event, $mink, $feature)
160160
{
161161
$feature->hasTag('insulated')->willReturn(true);
162162
$mink->stopSessions()->shouldBeCalled();
163-
$mink->setDefaultSessionName('goutte')->shouldBeCalled();
163+
$mink->setDefaultSessionName('browserkit_http')->shouldBeCalled();
164164

165165
$this->prepareDefaultMinkSession($event);
166166
}

src/Behat/MinkExtension/ServiceContainer/MinkExtension.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
use Behat\MinkExtension\ServiceContainer\Driver\BrowserKitFactory;
1616
use Behat\MinkExtension\ServiceContainer\Driver\BrowserStackFactory;
1717
use Behat\MinkExtension\ServiceContainer\Driver\DriverFactory;
18-
use Behat\MinkExtension\ServiceContainer\Driver\GoutteFactory;
1918
use Behat\MinkExtension\ServiceContainer\Driver\SahiFactory;
2019
use Behat\MinkExtension\ServiceContainer\Driver\SauceLabsFactory;
2120
use Behat\MinkExtension\ServiceContainer\Driver\Selenium2Factory;
@@ -53,7 +52,6 @@ class MinkExtension implements ExtensionInterface
5352

5453
public function __construct()
5554
{
56-
$this->registerDriverFactory(new GoutteFactory());
5755
$this->registerDriverFactory(new BrowserKitFactory());
5856
$this->registerDriverFactory(new SahiFactory());
5957
$this->registerDriverFactory(new SeleniumFactory());

0 commit comments

Comments
 (0)