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,6 +227,7 @@ class FixtureContext extends BehatContext
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Example: Given the "page" "Page 1" is not published
|
* Example: Given the "page" "Page 1" is not published
|
||||||
*
|
*
|
||||||
@ -256,6 +257,9 @@ class FixtureContext extends BehatContext
|
|||||||
$clone->delete();
|
$clone->delete();
|
||||||
\Versioned::reading_stage($oldMode);
|
\Versioned::reading_stage($oldMode);
|
||||||
break;
|
break;
|
||||||
|
case 'deleted':
|
||||||
|
$obj -> delete();
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
throw new \InvalidArgumentException(sprintf(
|
throw new \InvalidArgumentException(sprintf(
|
||||||
'Invalid state: "%s"', $state
|
'Invalid state: "%s"', $state
|
||||||
|
Loading…
Reference in New Issue
Block a user