diff options
author | Robin Appelman <robin@icewind.nl> | 2020-04-29 16:34:41 +0200 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2020-04-30 15:27:09 +0200 |
commit | 4e6d3d18805ba7713a65c461b627f8474d82f4f5 (patch) | |
tree | b209e7440b267d32e67325058062f66e9080758b /tests | |
parent | 8d5404b750df85a947c43aacc266c6088d8b4aed (diff) | |
download | nextcloud-server-4e6d3d18805ba7713a65c461b627f8474d82f4f5.tar.gz nextcloud-server-4e6d3d18805ba7713a65c461b627f8474d82f4f5.zip |
Fix getDirectoryContent implementation for Jail wrapper
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/Files/Storage/Storage.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/lib/Files/Storage/Storage.php b/tests/lib/Files/Storage/Storage.php index c37a8152989..ecc2bb50538 100644 --- a/tests/lib/Files/Storage/Storage.php +++ b/tests/lib/Files/Storage/Storage.php @@ -88,6 +88,21 @@ abstract class Storage extends \Test\TestCase { } $this->assertEquals([$directory], $content); + $content = iterator_to_array($this->instance->getDirectoryContent('/')); + + $this->assertCount(1, $content); + $dirEntry = $content[0]; + unset($dirEntry['scan_permissions']); + unset($dirEntry['etag']); + $this->assertEquals([ + 'name' => $directory, + 'mimetype' => $this->instance->getMimeType($directory), + 'mtime' => $this->instance->filemtime($directory), + 'size' => -1, + 'storage_mtime' => $this->instance->filemtime($directory), + 'permissions' => $this->instance->getPermissions($directory), + ], $dirEntry); + $this->assertFalse($this->instance->mkdir('/' . $directory)); //can't create existing folders $this->assertTrue($this->instance->rmdir('/' . $directory)); |