Changed the regex delimiter for "The url should match"
Using / as a regex delimiter when matching an url is a pain because it forces to escape all / in the url (and there more often / than " in an URL).
This commit is contained in:
@@ -99,7 +99,7 @@
|
|||||||
<target><![CDATA[/^musím být na stránce "(?P<page>[^"]+)"$/]]></target>
|
<target><![CDATA[/^musím být na stránce "(?P<page>[^"]+)"$/]]></target>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="the-url-should-match">
|
<trans-unit id="the-url-should-match">
|
||||||
<source><![CDATA[/^the url should match "(?P<pattern>(?:[^"]|\\")*)"$/]]></source>
|
<source><![CDATA[/^the (?i)url(?-i) should match "(?P<pattern>(?:[^"]|\\")*)"$/]]></source>
|
||||||
<target><![CDATA[/^(?:url|adresa|url adresa) musí mít tvar "(?P<pattern>(?:[^"]|\\")*)"$/]]></target>
|
<target><![CDATA[/^(?:url|adresa|url adresa) musí mít tvar "(?P<pattern>(?:[^"]|\\")*)"$/]]></target>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="the-element-should-contain">
|
<trans-unit id="the-element-should-contain">
|
||||||
|
|||||||
@@ -99,7 +99,7 @@
|
|||||||
<target><![CDATA[/^(?:|ich )sollte auf "(?P<page>[^"]+)" sein$/]]></target>
|
<target><![CDATA[/^(?:|ich )sollte auf "(?P<page>[^"]+)" sein$/]]></target>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="the-url-should-match">
|
<trans-unit id="the-url-should-match">
|
||||||
<source><![CDATA[/^the url should match "(?P<pattern>(?:[^"]|\\")*)"$/]]></source>
|
<source><![CDATA[/^the (?i)url(?-i) should match "(?P<pattern>(?:[^"]|\\")*)"$/]]></source>
|
||||||
<target><![CDATA[/^die Webadresse sollte mit "(?P<pattern>(?:[^"]|\\")*)" übereinstimmen$/]]></target>
|
<target><![CDATA[/^die Webadresse sollte mit "(?P<pattern>(?:[^"]|\\")*)" übereinstimmen$/]]></target>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="the-element-should-contain">
|
<trans-unit id="the-element-should-contain">
|
||||||
|
|||||||
@@ -99,7 +99,7 @@
|
|||||||
<target><![CDATA[/^debo estar en "(?P<page>[^"]+)"$/]]></target>
|
<target><![CDATA[/^debo estar en "(?P<page>[^"]+)"$/]]></target>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="the-url-should-match">
|
<trans-unit id="the-url-should-match">
|
||||||
<source><![CDATA[/^the url should match "(?P<pattern>(?:[^"]|\\")*)"$/]]></source>
|
<source><![CDATA[/^the (?i)url(?-i) should match "(?P<pattern>(?:[^"]|\\")*)"$/]]></source>
|
||||||
<target><![CDATA[/^la URL debe seguir el patrón "(?P<pattern>(?:[^"]|\\")*)"$/]]></target>
|
<target><![CDATA[/^la URL debe seguir el patrón "(?P<pattern>(?:[^"]|\\")*)"$/]]></target>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="the-element-should-contain">
|
<trans-unit id="the-element-should-contain">
|
||||||
|
|||||||
@@ -99,8 +99,8 @@
|
|||||||
<target><![CDATA[/^(?:|je )devrais être sur "(?P<page>[^"]+)"$/]]></target>
|
<target><![CDATA[/^(?:|je )devrais être sur "(?P<page>[^"]+)"$/]]></target>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="the-url-should-match">
|
<trans-unit id="the-url-should-match">
|
||||||
<source><![CDATA[/^the url should match "(?P<pattern>(?:[^"]|\\")*)"$/]]></source>
|
<source><![CDATA[/^the (?i)url(?-i) should match "(?P<pattern>(?:[^"]|\\")*)"$/]]></source>
|
||||||
<target><![CDATA[/^l'url devrait suivre le motif "(?P<pattern>(?:[^"]|\\")*)"$/]]></target>
|
<target><![CDATA[/^l'(?i)url(?-i) devrait suivre le motif "(?P<pattern>(?:[^"]|\\")*)"$/]]></target>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="the-element-should-contain">
|
<trans-unit id="the-element-should-contain">
|
||||||
<source><![CDATA[/^the "(?P<element>[^"]*)" element should contain "(?P<value>(?:[^"]|\\")*)"$/]]></source>
|
<source><![CDATA[/^the "(?P<element>[^"]*)" element should contain "(?P<value>(?:[^"]|\\")*)"$/]]></source>
|
||||||
|
|||||||
@@ -99,8 +99,8 @@
|
|||||||
<target><![CDATA[/^(?:|ユーザーが )(?P<page>[^\s]+) を表示していること$/]]></target>
|
<target><![CDATA[/^(?:|ユーザーが )(?P<page>[^\s]+) を表示していること$/]]></target>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="the-url-should-match">
|
<trans-unit id="the-url-should-match">
|
||||||
<source><![CDATA[/^the (?i)url(?-i) should match (?P<pattern>\/([^\/]|\\\/)*\/)$/]]></source>
|
<source><![CDATA[/^the (?i)url(?-i) should match (?P<pattern>"([^"]|\\")*")$/]]></source>
|
||||||
<target><![CDATA[/^(?i)url(?-i)が "(?P<pattern>\/([^\/]|\\\/)*\/)" にマッチすること$/]]></target>
|
<target><![CDATA[/^(?i)url(?-i)が (?P<pattern>"([^"]|\\")*") にマッチすること$/]]></target>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="the-element-should-contain">
|
<trans-unit id="the-element-should-contain">
|
||||||
<source><![CDATA[/^the "(?P<element>[^"]*)" element should contain "(?P<value>(?:[^"]|\\")*)"$/]]></source>
|
<source><![CDATA[/^the "(?P<element>[^"]*)" element should contain "(?P<value>(?:[^"]|\\")*)"$/]]></source>
|
||||||
|
|||||||
@@ -95,7 +95,7 @@
|
|||||||
<target><![CDATA[/^moet (?:|ik )op "(?P<page>[^"]+)" zijn$/]]></target>
|
<target><![CDATA[/^moet (?:|ik )op "(?P<page>[^"]+)" zijn$/]]></target>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="the-url-should-match">
|
<trans-unit id="the-url-should-match">
|
||||||
<source><![CDATA[/^the url should match "(?P<pattern>(?:[^"]|\\")*)"$/]]></source>
|
<source><![CDATA[/^the (?i)url(?-i) should match "(?P<pattern>(?:[^"]|\\")*)"$/]]></source>
|
||||||
<target><![CDATA[/^moet de url overeenkomen met "(?P<pattern>(?:[^"]|\\")*)"$/]]></target>
|
<target><![CDATA[/^moet de url overeenkomen met "(?P<pattern>(?:[^"]|\\")*)"$/]]></target>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="the-element-should-contain">
|
<trans-unit id="the-element-should-contain">
|
||||||
|
|||||||
@@ -99,7 +99,7 @@
|
|||||||
<target><![CDATA[/^(?:|że )powinienem być na stronie "(?P<page>[^"]+)"$/]]></target>
|
<target><![CDATA[/^(?:|że )powinienem być na stronie "(?P<page>[^"]+)"$/]]></target>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="the-url-should-match">
|
<trans-unit id="the-url-should-match">
|
||||||
<source><![CDATA[/^the url should match "(?P<pattern>(?:[^"]|\\")*)"$/]]></source>
|
<source><![CDATA[/^the (?i)url(?-i) should match "(?P<pattern>(?:[^"]|\\")*)"$/]]></source>
|
||||||
<target><![CDATA[/^(?:url|adres) powinien odpowiadać "(?P<pattern>(?:[^"]|\\")*)"$/]]></target>
|
<target><![CDATA[/^(?:url|adres) powinien odpowiadać "(?P<pattern>(?:[^"]|\\")*)"$/]]></target>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="the-element-should-contain">
|
<trans-unit id="the-element-should-contain">
|
||||||
|
|||||||
@@ -95,7 +95,7 @@
|
|||||||
<target><![CDATA[/^(?:|Eu )devo de estar em "(?P<page>[^"]+)"$/]]></target>
|
<target><![CDATA[/^(?:|Eu )devo de estar em "(?P<page>[^"]+)"$/]]></target>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="the-url-should-match">
|
<trans-unit id="the-url-should-match">
|
||||||
<source><![CDATA[/^the url should match "(?P<pattern>(?:[^"]|\\")*)"$/]]></source>
|
<source><![CDATA[/^the (?i)url(?-i) should match "(?P<pattern>(?:[^"]|\\")*)"$/]]></source>
|
||||||
<target><![CDATA[/^o endereço deve coincidir com "(?P<pattern>(?:[^"]|\\")*)"$/]]></target>
|
<target><![CDATA[/^o endereço deve coincidir com "(?P<pattern>(?:[^"]|\\")*)"$/]]></target>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="the-element-should-contain">
|
<trans-unit id="the-element-should-contain">
|
||||||
|
|||||||
@@ -107,7 +107,7 @@
|
|||||||
<target><![CDATA[/^(?:|я )должен быть на странице "(?P<page>[^"]+)"$/]]></target>
|
<target><![CDATA[/^(?:|я )должен быть на странице "(?P<page>[^"]+)"$/]]></target>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="the-url-should-match">
|
<trans-unit id="the-url-should-match">
|
||||||
<source><![CDATA[/^the (?i)url(?-i) should match (?P<pattern>\/([^\/]|\\\/)*\/)$/]]></source>
|
<source><![CDATA[/^the (?i)url(?-i) should match (?P<pattern>"([^"]|\\")*")$/]]></source>
|
||||||
<target><![CDATA[/^(?:url|адрес) должен соответствовать "(?P<pattern>(?:[^"]|\\")*)"$/]]></target>
|
<target><![CDATA[/^(?:url|адрес) должен соответствовать "(?P<pattern>(?:[^"]|\\")*)"$/]]></target>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="the-element-should-contain">
|
<trans-unit id="the-element-should-contain">
|
||||||
|
|||||||
@@ -95,7 +95,7 @@
|
|||||||
<target><![CDATA[/^(?:|jag )skulle vara på "(?P<page>[^"]+)"$/]]></target>
|
<target><![CDATA[/^(?:|jag )skulle vara på "(?P<page>[^"]+)"$/]]></target>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="the-url-should-match">
|
<trans-unit id="the-url-should-match">
|
||||||
<source><![CDATA[/^the url should match "(?P<pattern>(?:[^"]|\\")*)"$/]]></source>
|
<source><![CDATA[/^the (?i)url(?-i) should match "(?P<pattern>(?:[^"]|\\")*)"$/]]></source>
|
||||||
<target><![CDATA[/^webbadressen skulle matcha "(?P<pattern>(?:[^"]|\\")*)"$/]]></target>
|
<target><![CDATA[/^webbadressen skulle matcha "(?P<pattern>(?:[^"]|\\")*)"$/]]></target>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="the-element-should-contain">
|
<trans-unit id="the-element-should-contain">
|
||||||
|
|||||||
@@ -186,7 +186,7 @@ class MinkContext extends RawMinkContext implements TranslatedContextInterface
|
|||||||
/**
|
/**
|
||||||
* Checks, that current page PATH matches regular expression.
|
* Checks, that current page PATH matches regular expression.
|
||||||
*
|
*
|
||||||
* @Then /^the (?i)url(?-i) should match (?P<pattern>\/([^\/]|\\\/)*\/)$/
|
* @Then /^the (?i)url(?-i) should match (?P<pattern>"([^"]|\\")*")$/
|
||||||
*/
|
*/
|
||||||
public function assertUrlRegExp($pattern)
|
public function assertUrlRegExp($pattern)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -254,7 +254,7 @@ trait MinkDictionary
|
|||||||
/**
|
/**
|
||||||
* Checks, that current page PATH matches regular expression.
|
* Checks, that current page PATH matches regular expression.
|
||||||
*
|
*
|
||||||
* @Then /^the (?i)url(?-i) should match (?P<pattern>\/([^\/]|\\\/)*\/)$/
|
* @Then /^the (?i)url(?-i) should match (?P<pattern>"([^"]|\\")*")$/
|
||||||
*/
|
*/
|
||||||
public function assertUrlRegExp($pattern)
|
public function assertUrlRegExp($pattern)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user