From 6b7f5f8d3ccb79441b34c08f4185c48e7f9cf785 Mon Sep 17 00:00:00 2001 From: Sriram Venkatesh Date: Fri, 15 Nov 2013 16:15:37 +1300 Subject: [PATCH] Added delete state to step defination --- src/SilverStripe/BehatExtension/Context/FixtureContext.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/SilverStripe/BehatExtension/Context/FixtureContext.php b/src/SilverStripe/BehatExtension/Context/FixtureContext.php index 267a3e6..608f2dc 100644 --- a/src/SilverStripe/BehatExtension/Context/FixtureContext.php +++ b/src/SilverStripe/BehatExtension/Context/FixtureContext.php @@ -227,7 +227,8 @@ class FixtureContext extends BehatContext } } - /** + + /** * Example: Given the "page" "Page 1" is not published * * @Given /^(?:(an|a|the) )"(?[^"]+)" "(?[^"]+)" is (?[^"]*)$/ @@ -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