aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/files/storage/storage.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/files/storage/storage.php')
-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 19113f52623..5a0581665a2 100644
--- a/tests/lib/files/storage/storage.php
+++ b/tests/lib/files/storage/storage.php
@@ -254,7 +254,19 @@ abstract class Storage extends \PHPUnit_Framework_TestCase {
$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->assertTrue($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'));
+ }
+
+ public function testRecursiveUnlink() {
+ $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->assertTrue($this->instance->unlink('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'));