Added delete state to step defination

This commit is contained in:
Sriram Venkatesh 2013-11-15 16:15:37 +13:00
parent 3f13791404
commit 6b7f5f8d3c

View File

@ -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