summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-02-28 12:06:34 +0100
committerRobin Appelman <icewind@owncloud.com>2012-02-28 12:06:34 +0100
commitd1c3aa3112b363f84d721e9fce299d24833cbe7e (patch)
tree9d094dca94d18ecda1c312a2e8d419dd9935f063 /tests
parentde37bafa5c00683984302ca6849719a282835da0 (diff)
downloadnextcloud-server-d1c3aa3112b363f84d721e9fce299d24833cbe7e.tar.gz
nextcloud-server-d1c3aa3112b363f84d721e9fce299d24833cbe7e.zip
add test case for getLocalFile
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/filestorage.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/lib/filestorage.php b/tests/lib/filestorage.php
index 5a89c74fe89..fb050868ee3 100644
--- a/tests/lib/filestorage.php
+++ b/tests/lib/filestorage.php
@@ -118,6 +118,12 @@ abstract class Test_FileStorage extends UnitTestCase {
$this->assertFalse($this->instance->file_exists('/source.txt'));
$this->assertEqual(file_get_contents($textFile),$this->instance->file_get_contents('/target.txt'));
}
+
+ public function testLocalFile(){
+ $textFile=OC::$SERVERROOT.'/tests/data/lorem.txt';
+ $this->instance->file_put_contents('/lorem.txt',file_get_contents($textFile));
+ $localFile=$this->instance->getLocalFile('/lorem.txt');
+ $this->assertTrue(file_exists($localFile));
+ $this->assertEqual(file_get_contents($localFile),file_get_contents($textFile));
+ }
}
-
-