mirror of
https://github.com/silverstripe/silverstripe-behat-extension
synced 2024-10-22 17:05:32 +02:00
Allow "given ... has data" notation for fixtures
Makes more sense in english when the fixture has already been created beforehand
This commit is contained in:
parent
5bf9eb4961
commit
4dece01c34
@ -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) )"(?<type>[^"]+)" "(?<id>[^"]+)" with (?<data>.*)$/
|
||||
* @Given /^(?:(an|a|the) )"(?<type>[^"]+)" "(?<id>[^"]+)" (?:(with|has)) (?<data>".*)$/
|
||||
*/
|
||||
public function stepCreateRecordWithData($type, $id, $data) {
|
||||
$class = $this->convertTypeToClass($type);
|
||||
|
Loading…
Reference in New Issue
Block a user