From 4dece01c341c540a46a462f85abc4ca1291a3fad Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Sun, 15 Feb 2015 12:07:06 +1300 Subject: [PATCH] Allow "given ... has data" notation for fixtures Makes more sense in english when the fixture has already been created beforehand --- src/SilverStripe/BehatExtension/Context/FixtureContext.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/SilverStripe/BehatExtension/Context/FixtureContext.php b/src/SilverStripe/BehatExtension/Context/FixtureContext.php index e5da1fe..476860f 100644 --- a/src/SilverStripe/BehatExtension/Context/FixtureContext.php +++ b/src/SilverStripe/BehatExtension/Context/FixtureContext.php @@ -144,8 +144,9 @@ class FixtureContext extends BehatContext /** * Example: Given a "page" "Page 1" with "URL"="page-1" and "Content"="my page 1" + * Example: Given the "page" "Page 1" has "URL"="page-1" and "Content"="my page 1" * - * @Given /^(?:(an|a|the) )"(?[^"]+)" "(?[^"]+)" with (?.*)$/ + * @Given /^(?:(an|a|the) )"(?[^"]+)" "(?[^"]+)" (?:(with|has)) (?".*)$/ */ public function stepCreateRecordWithData($type, $id, $data) { $class = $this->convertTypeToClass($type);