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

1.3 #358

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

1.3 #358

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@
"require": {
"php": ">=5.3.2",
"behat/behat": "~2.5.0",
"behat/mink": ">=1.4.3,<1.6-dev",
"behat/mink": "~1.5",
"symfony/config": "~2.2"
},

"require-dev": {
"fabpot/goutte": "~1.0",
"behat/mink-goutte-driver": "~1.0"
},

Expand Down
20 changes: 20 additions & 0 deletions i18n/nl.xliff
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@
<source><![CDATA[/^(?:|I )fill in "(?P<field>(?:[^"]|\\")*)" with "(?P<value>(?:[^"]|\\")*)"$/]]></source>
<target><![CDATA[/^(?:|ik )het veld "(?P<field>(?:[^"]|\\")*)" invul met "(?P<value>(?:[^"]|\\")*)"$/]]></target>
</trans-unit>
<trans-unit id="i-fill-in-field-with">
<source><![CDATA[/^(?:|I )fill in "(?P<field>(?:[^"]|\\")*)" with:$/]]></source>
<target><![CDATA[/^(?:|ik )het veld "(?P<field>(?:[^"]|\\")*)" invul met:$/]]></target>
</trans-unit>
<trans-unit id="i-fill-in-value-for-field">
<source><![CDATA[/^(?:|I )fill in "(?P<value>(?:[^"]|\\")*)" for "(?P<field>(?:[^"]|\\")*)"$/]]></source>
<target><![CDATA[/^(?:|ik )de waarde "(?P<value>(?:[^"]|\\")*)" invul in "(?P<field>(?:[^"]|\\")*)"$/]]></target>
Expand Down Expand Up @@ -106,10 +110,22 @@
<source><![CDATA[/^the "(?P<checkbox>(?:[^"]|\\")*)" checkbox should be checked$/]]></source>
<target><![CDATA[/^moet "(?P<checkbox>(?:[^"]|\\")*)" aangevinkt zijn$/]]></target>
</trans-unit>
<trans-unit id="the-checkbox-should-is-checked">
<source><![CDATA[/^the checkbox "(?P<checkbox>(?:[^"]|\\")*)" (?:is|should be) checked$/]]></source>
<target><![CDATA[/^"(?P<checkbox>(?:[^"]|\\")*)" (?:is|zou moeten zijn) aangevinkt$/]]></target>
</trans-unit>
<trans-unit id="the-checkbox-should-be-unchecked">
<source><![CDATA[/^the checkbox "(?P<checkbox>(?:[^"]|\\")*)" should (?:be unchecked|not be checked)$/]]></source>
<target><![CDATA[/^moet "(?P<checkbox>(?:[^"]|\\")*)" niet aangevinkt zijn$/]]></target>
</trans-unit>
<trans-unit id="the-checkbox-should-not-be-checked">
<source><![CDATA[/^the "(?P<checkbox>(?:[^"]|\\")*)" checkbox should not be checked$/]]></source>
<target><![CDATA[/^moet "(?P<checkbox>(?:[^"]|\\")*)" niet aangevinkt zijn$/]]></target>
</trans-unit>
<trans-unit id="the-checkbox-is-unchecked">
<source><![CDATA[/^the checkbox "(?P<checkbox>(?:[^"]|\\")*)" is (?:unchecked|not checked)$/]]></source>
<target><![CDATA[/^"(?P<checkbox>(?:[^"]|\\")*)" is niet aangevinkt$/]]></target>
</trans-unit>
<trans-unit id="i-should-be-on-page">
<source><![CDATA[/^(?:|I )should be on "(?P<page>[^"]+)"$/]]></source>
<target><![CDATA[/^moet (?:|ik )op "(?P<page>[^"]+)" zijn$/]]></target>
Expand Down Expand Up @@ -154,6 +170,10 @@
<source><![CDATA[/^the response status code should not be (?P<code>\d+)$/]]></source>
<target><![CDATA[/^moet de statuscode van het antwoord niet (?P<code>\d+) zijn$/]]></target>
</trans-unit>
<trans-unit id="print-current-URL">
<source><![CDATA[/^print current URL$/]]></source>
<target><![CDATA[/^print huidige URL$/]]></target>
</trans-unit>
<trans-unit id="print-last-response">
<source><![CDATA[/^print last response$/]]></source>
<target><![CDATA[/^print het laatste antwoord$/]]></target>
Expand Down
11 changes: 11 additions & 0 deletions src/Behat/MinkExtension/Extension.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@ public function load(array $config, ContainerBuilder $container)
);
}

$refl = new \ReflectionParameter(array('Goutte\Client', 'setClient'), 0);
if (!$refl->getClass() || 'Guzzle\Http\ClientInterface' !== $refl->getClass()->getName()) {
throw new \RuntimeException(
'MinkExtension 1.3 only supports Goutte 1.x for MinkGoutteDriver, not Goutte 2.x.'
);
}

$loader->load('sessions/goutte.xml');
}
if (isset($config['sahi'])) {
Expand Down Expand Up @@ -327,6 +334,10 @@ public function getConfig(ArrayNodeDefinition $builder)
scalarNode('ftpProxy')->end()->
scalarNode('httpProxy')->end()->
scalarNode('sslProxy')->end()->
scalarNode('socksProxy')->end()->
scalarNode('socksUsername')->end()->
scalarNode('socksPassword')->end()->
scalarNode('noProxy')->end()->
end()->
validate()->
ifTrue(function ($v) {
Expand Down