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