FIX: Soften coupling to SiteTree

The SiteTree link still exists but the module
will work if SiteTree isn’t installed.
This commit is contained in:
Sam Minnee 2017-05-05 11:20:53 +12:00 committed by Sam Minnée
parent 7383c1bce9
commit 4f3d3fdbab

View File

@ -268,8 +268,10 @@ abstract class SilverStripeContext extends MinkContext implements SilverStripeAw
}
DataObject::flush_and_destroy_cache();
DataObject::reset();
if (class_exists(SiteTree::class)) {
SiteTree::reset();
}
}
/**
* Returns a parameter map of state to set within the test session.