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:
Ingo Schommer 2016-03-17 17:31:33 +13:00
commit 805a0e69ed

View File

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