Fix FixtureContext::prepareAsset() assuming ParentID

In some cases, we want to create an asset that doesn't have a ParentID set. This
fix allows that to happen.
This commit is contained in:
Matt Peel 2014-01-07 09:22:49 +13:00
parent c456dbac5d
commit d9d0b4fa93

View File

@ -455,7 +455,7 @@ class FixtureContext extends BehatContext
}
$data['Filename'] = $this->joinPaths(ASSETS_DIR, $relativeTargetPath);
if(!isset($data['Name'])) $data['Name'] = basename($relativeTargetPath);
$data['ParentID'] = $parent->ID;
if($parent) $data['ParentID'] = $parent->ID;
$this->createdFilesPaths[] = $targetPath;