Added a unit test for #3464
Signed-off-by: Dan Bernardic <dan.bernardic@gmail.com>
diff --git a/tests/mocks/ci_testcase.php b/tests/mocks/ci_testcase.php
index ad4fe5a..a2c37b9 100644
--- a/tests/mocks/ci_testcase.php
+++ b/tests/mocks/ci_testcase.php
@@ -274,14 +274,14 @@
* @param string Path from base directory
* @return bool TRUE on success, otherwise FALSE
*/
- public function ci_vfs_clone($path)
+ public function ci_vfs_clone($path, $dest='')
{
// Check for array
if (is_array($path))
{
foreach ($path as $file)
{
- $this->ci_vfs_clone($file);
+ $this->ci_vfs_clone($file, $dest);
}
return;
}
@@ -294,7 +294,12 @@
return FALSE;
}
- $this->ci_vfs_create(basename($path), $content, NULL, dirname($path));
+ if (empty($dest))
+ {
+ $dest = dirname($path);
+ }
+
+ $this->ci_vfs_create(basename($path), $content, NULL, $dest);
return TRUE;
}
@@ -378,4 +383,4 @@
}
}
-}
\ No newline at end of file
+}