mirror of
https://github.com/silverstripe/silverstripe-behat-extension
synced 2024-10-22 17:05:32 +02:00
Fix Fixture bug with new Versioned API changes in 4.x
This commit is contained in:
parent
7ef575c961
commit
4241f78bbc
@ -333,10 +333,10 @@ class FixtureContext extends BehatContext
|
||||
case 'not published':
|
||||
case 'unpublished':
|
||||
$oldMode = \Versioned::get_reading_mode();
|
||||
\Versioned::reading_stage('Live');
|
||||
\Versioned::set_stage(\Versioned::LIVE);
|
||||
$clone = clone $obj;
|
||||
$clone->delete();
|
||||
\Versioned::reading_stage($oldMode);
|
||||
\Versioned::set_reading_mode($oldMode);
|
||||
break;
|
||||
case 'deleted':
|
||||
$obj->delete();
|
||||
|
Loading…
Reference in New Issue
Block a user