Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorThomas Mueller <thomas.mueller@tmit.eu>2013-02-07 02:36:38 +0400
committerThomas Mueller <thomas.mueller@tmit.eu>2013-02-07 02:41:52 +0400
commitfd8cb9974be30aaca0d65d1807d6a4f784da5f0b (patch)
treef7dabbfa07d725b3e73f1b8df11a9eebc4933416 /tests
parent223f538bb8666c7943784c12f1213384df1a41c0 (diff)
initial version of a local storage implementation which will use unique slugified filename on the local filesystem.
This implementation will only be enabled on windows based system to solve the issues around UTF-8 file names with php on windows.
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/files/storage/storage.php17
1 files changed, 13 insertions, 4 deletions
diff --git a/tests/lib/files/storage/storage.php b/tests/lib/files/storage/storage.php
index 781c0f92c92..c74a16f509f 100644
--- a/tests/lib/files/storage/storage.php
+++ b/tests/lib/files/storage/storage.php
@@ -146,10 +146,19 @@ abstract class Storage extends \PHPUnit_Framework_TestCase {
$localFolder = $this->instance->getLocalFolder('/folder');
$this->assertTrue(is_dir($localFolder));
- $this->assertTrue(file_exists($localFolder . '/lorem.txt'));
- $this->assertEquals(file_get_contents($localFolder . '/lorem.txt'), file_get_contents($textFile));
- $this->assertEquals(file_get_contents($localFolder . '/bar.txt'), 'asd');
- $this->assertEquals(file_get_contents($localFolder . '/recursive/file.txt'), 'foo');
+
+ // test below require to use instance->getLocalFile because the physical storage might be different
+ $localFile = $this->instance->getLocalFile('/folder/lorem.txt');
+ $this->assertTrue(file_exists($localFile));
+ $this->assertEquals(file_get_contents($localFile), file_get_contents($textFile));
+
+ $localFile = $this->instance->getLocalFile('/folder/bar.txt');
+ $this->assertTrue(file_exists($localFile));
+ $this->assertEquals(file_get_contents($localFile), 'asd');
+
+ $localFile = $this->instance->getLocalFile('/folder/recursive/file.txt');
+ $this->assertTrue(file_exists($localFile));
+ $this->assertEquals(file_get_contents($localFile), 'foo');
}
public function testStat() {