summaryrefslogtreecommitdiffstats
path: root/tests/mocks/ci_testcase.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2015-01-12 16:23:26 +0100
committerAndrey Andreev <narf@devilix.net>2015-01-12 16:23:26 +0100
commit45a8afaabc6d09ad59bbb3c89a6cdfe8cbc3312c (patch)
tree7ca4207099f9225b5ef74b31f48627a282e7fdf2 /tests/mocks/ci_testcase.php
parentcd94dd7e1d8969658810ccc4158a75d2936d0a44 (diff)
parent934d6d9797f4dadd4e4d05b12bc4d7309fedb6c3 (diff)
Merge branch 'develop' into feature/session
Diffstat (limited to 'tests/mocks/ci_testcase.php')
-rw-r--r--tests/mocks/ci_testcase.php13
1 files changed, 9 insertions, 4 deletions
diff --git a/tests/mocks/ci_testcase.php b/tests/mocks/ci_testcase.php
index ad4fe5ac3..a2c37b92e 100644
--- a/tests/mocks/ci_testcase.php
+++ b/tests/mocks/ci_testcase.php
@@ -274,14 +274,14 @@ class CI_TestCase extends PHPUnit_Framework_TestCase {
* @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 @@ class CI_TestCase extends PHPUnit_Framework_TestCase {
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 @@ class CI_TestCase extends PHPUnit_Framework_TestCase {
}
}
-} \ No newline at end of file
+}