mirror of
https://github.com/silverstripe/silverstripe-behat-extension
synced 2024-10-22 17:05:32 +02:00
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:
parent
c456dbac5d
commit
d9d0b4fa93
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user