From 0571432095410339a1b5ba5a74d253ca923776f5 Mon Sep 17 00:00:00 2001 From: Jeffrey Guo Date: Fri, 5 Feb 2016 16:21:04 +1300 Subject: [PATCH] Revert "Fixed Folder::find_or_make() use" This reverts commit 8d49da260988b1cee1eac420f37bfe80d4c0eb6b. --- src/SilverStripe/BehatExtension/Context/FixtureContext.php | 4 +--- tests/Context/FixtureContextTest.php | 0 2 files changed, 1 insertion(+), 3 deletions(-) delete mode 100644 tests/Context/FixtureContextTest.php diff --git a/src/SilverStripe/BehatExtension/Context/FixtureContext.php b/src/SilverStripe/BehatExtension/Context/FixtureContext.php index 112d9cf..0fd077d 100644 --- a/src/SilverStripe/BehatExtension/Context/FixtureContext.php +++ b/src/SilverStripe/BehatExtension/Context/FixtureContext.php @@ -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"', diff --git a/tests/Context/FixtureContextTest.php b/tests/Context/FixtureContextTest.php deleted file mode 100644 index e69de29..0000000