mirror of
https://github.com/silverstripe/silverstripe-behat-extension
synced 2024-10-22 17:05:32 +02:00
Added delete state to step defination
This commit is contained in:
parent
3f13791404
commit
6b7f5f8d3c
@ -227,7 +227,8 @@ class FixtureContext extends BehatContext
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
/**
|
||||
* Example: Given the "page" "Page 1" is not published
|
||||
*
|
||||
* @Given /^(?:(an|a|the) )"(?<type>[^"]+)" "(?<id>[^"]+)" is (?<state>[^"]*)$/
|
||||
@ -256,6 +257,9 @@ class FixtureContext extends BehatContext
|
||||
$clone->delete();
|
||||
\Versioned::reading_stage($oldMode);
|
||||
break;
|
||||
case 'deleted':
|
||||
$obj -> delete();
|
||||
break;
|
||||
default:
|
||||
throw new \InvalidArgumentException(sprintf(
|
||||
'Invalid state: "%s"', $state
|
||||
|
Loading…
Reference in New Issue
Block a user