mirror of
https://github.com/silverstripe/silverstripe-behat-extension
synced 2024-10-22 17:05:32 +02:00
Merge pull request #19 from madmatt/pulls/fix-fixture-parentid
Fix FixtureContext::prepareAsset() assuming Parent exists
This commit is contained in:
commit
db5dfa0e01
@ -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