Merge pull request #4719 from tractorcow/pulls/3.2/fix-folder-fixtures

BUG Fix regression from #4396 in test fixtures
This commit is contained in:
Ingo Schommer 2015-10-30 09:12:08 +13:00
commit 9c4443629e

View File

@ -192,6 +192,11 @@ class FixtureBlueprint {
if($data && array_key_exists('LastEdited', $data)) {
$this->overrideField($obj, 'LastEdited', $data['LastEdited'], $fixtures);
}
// Ensure Folder objects exist physically, as otherwise future File fixtures can't detect them
if($obj instanceof Folder) {
Filesystem::makeFolder($obj->getFullPath());
}
} catch(Exception $e) {
Config::inst()->update('DataObject', 'validation_enabled', $validationenabled);
throw $e;