diff options
author | Christian Berendt <berendt@b1-systems.de> | 2013-07-03 18:11:54 +0200 |
---|---|---|
committer | Christian Berendt <berendt@b1-systems.de> | 2013-07-03 18:11:54 +0200 |
commit | 81acfc9498d1451d7266dbad024cd3d29d7d0b1a (patch) | |
tree | 3caadbf4c38bc80643f92388dacd12e61dcd644a /tests | |
parent | 21601fd78448ede37bc6f55c9880fc27a4df9ae3 (diff) | |
download | nextcloud-server-81acfc9498d1451d7266dbad024cd3d29d7d0b1a.tar.gz nextcloud-server-81acfc9498d1451d7266dbad024cd3d29d7d0b1a.zip |
test copying and moving files in subdirectories
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/files/storage/storage.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/lib/files/storage/storage.php b/tests/lib/files/storage/storage.php index 155a99d8bab..4a3a0c40e08 100644 --- a/tests/lib/files/storage/storage.php +++ b/tests/lib/files/storage/storage.php @@ -129,6 +129,16 @@ abstract class Storage extends \PHPUnit_Framework_TestCase { $this->assertTrue($this->instance->file_exists('/target2.txt')); $this->assertFalse($this->instance->file_exists('/source.txt')); $this->assertEquals(file_get_contents($textFile), $this->instance->file_get_contents('/target.txt')); + + // check if it's working inside directories as well + $this->instance->mkdir('/folder'); + $this->instance->file_put_contents('/folder/lorem.txt', $sourceText); + $this->assertFalse($this->instance->is_dir('/folder/lorem.txt')); + $this->assertEquals($sourceText, $this->instance->file_get_contents('/folder/lorem.txt'), 'data returned from file_get_contents is not equal to the source data'); + $this->instance->file_put_contents('/folder/lorem.txt', ''); + $this->assertEquals('', $this->instance->file_get_contents('/folder/lorem.txt'), 'file not emptied'); + $this->instance->rmdir('/folder'); + $this->assertFalse($this->instance->file_exists('/folder/lorem.txt')); } public function testLocal() { |