summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2013-06-30 09:16:32 -0700
committerThomas Müller <thomas.mueller@tmit.eu>2013-06-30 09:16:32 -0700
commit8beec2015a43839818f9b6f14283b8980ec185b3 (patch)
treec051d879150ea0fa26f2eb4be037e68460c5c3ea /tests
parent4d74e8955f4eee870fd83e4eaa30b8e90a0a9f06 (diff)
parentd051d6f9252de915a13e1b053c54f69bcd83f5ee (diff)
downloadnextcloud-server-8beec2015a43839818f9b6f14283b8980ec185b3.tar.gz
nextcloud-server-8beec2015a43839818f9b6f14283b8980ec185b3.zip
Merge pull request #3763 from owncloud/recursive-rmdir
Make rmdir recursive for local storage
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/files/storage/storage.php14
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/lib/files/storage/storage.php b/tests/lib/files/storage/storage.php
index 0e22f26ae83..fb3e05e66b3 100644
--- a/tests/lib/files/storage/storage.php
+++ b/tests/lib/files/storage/storage.php
@@ -258,9 +258,21 @@ abstract class Storage extends \PHPUnit_Framework_TestCase {
$this->assertEquals(file_get_contents($textFile), $content);
}
- public function testTouchCreateFile(){
+ public function testTouchCreateFile() {
$this->assertFalse($this->instance->file_exists('foo'));
$this->instance->touch('foo');
$this->assertTrue($this->instance->file_exists('foo'));
}
+
+ public function testRecursiveRmdir() {
+ $this->instance->mkdir('folder');
+ $this->instance->mkdir('folder/bar');
+ $this->instance->file_put_contents('folder/asd.txt', 'foobar');
+ $this->instance->file_put_contents('folder/bar/foo.txt', 'asd');
+ $this->instance->rmdir('folder');
+ $this->assertFalse($this->instance->file_exists('folder/asd.txt'));
+ $this->assertFalse($this->instance->file_exists('folder/bar/foo.txt'));
+ $this->assertFalse($this->instance->file_exists('folder/bar'));
+ $this->assertFalse($this->instance->file_exists('folder'));
+ }
}