Merge pull request #19 from madmatt/pulls/fix-fixture-parentid

Fix FixtureContext::prepareAsset() assuming Parent exists
This commit is contained in:
Ingo Schommer 2014-01-30 15:06:39 -08:00
commit db5dfa0e01

View File

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