Fix Fixture bug with new Versioned API changes in 4.x

This commit is contained in:
Hamish Friedlander 2016-03-17 17:12:33 +13:00
parent 7ef575c961
commit 4241f78bbc

View File

@ -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();