diff options
author | Thomas Mueller <thomas.mueller@tmit.eu> | 2013-02-06 23:36:38 +0100 |
---|---|---|
committer | Thomas Mueller <thomas.mueller@tmit.eu> | 2013-02-06 23:41:52 +0100 |
commit | fd8cb9974be30aaca0d65d1807d6a4f784da5f0b (patch) | |
tree | f7dabbfa07d725b3e73f1b8df11a9eebc4933416 /tests | |
parent | 223f538bb8666c7943784c12f1213384df1a41c0 (diff) | |
download | nextcloud-server-fd8cb9974be30aaca0d65d1807d6a4f784da5f0b.tar.gz nextcloud-server-fd8cb9974be30aaca0d65d1807d6a4f784da5f0b.zip |
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.php | 17 |
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() { |