mirror of
https://github.com/silverstripe/silverstripe-behat-extension
synced 2024-10-22 17:05:32 +02:00
Revert "Fixed Folder::find_or_make() use"
This reverts commit 8d49da2609
.
This commit is contained in:
parent
3a292d796b
commit
0571432095
@ -553,13 +553,11 @@ class FixtureContext extends BehatContext
|
||||
$sourcePath = $this->joinPaths($this->getFilesPath(), basename($relativeTargetPath));
|
||||
|
||||
// Create file or folder on filesystem
|
||||
$parent = null;
|
||||
$parent = \Folder::find_or_make(dirname($relativeTargetPath));
|
||||
if($class == 'Folder' || is_subclass_of($class, 'Folder')) {
|
||||
$parent = \Folder::find_or_make($relativeTargetPath);
|
||||
$targetPath = $this->joinPaths(ASSETS_PATH, $relativeTargetPath);
|
||||
$data['ID'] = $parent->ID;
|
||||
} else {
|
||||
$parent = \Folder::find_or_make(dirname($relativeTargetPath));
|
||||
if(!file_exists($sourcePath)) {
|
||||
throw new \InvalidArgumentException(sprintf(
|
||||
'Source file for "%s" cannot be found in "%s"',
|
||||
|
Loading…
Reference in New Issue
Block a user