File tree Expand file tree Collapse file tree 3 files changed +16
-0
lines changed
tests/unit/Files/PublicFiles Expand file tree Collapse file tree 3 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -71,4 +71,8 @@ public function put($data) {
7171 throw new Forbidden ('Permission denied to change data ' );
7272 }
7373 }
74+
75+ public function getSize () {
76+ return $ this ->file ->getSize ();
77+ }
7478}
Original file line number Diff line number Diff line change @@ -34,4 +34,12 @@ public function testETag() {
3434 $ metaFile = new SharedFile ($ file , $ share );
3535 $ this ->assertEquals ('"123456" ' , $ metaFile ->getETag ());
3636 }
37+
38+ public function testSize () {
39+ $ file = $ this ->createMock (File::class);
40+ $ file ->method ('getSize ' )->willReturn (42 );
41+ $ share = $ this ->createMock (IShare::class);
42+ $ metaFile = new SharedFile ($ file , $ share );
43+ $ this ->assertEquals (42 , $ metaFile ->getSize ());
44+ }
3745}
Original file line number Diff line number Diff line change 1+ Bugfix: Return correct file size in the public files webdav API
2+
3+ https://github.com/owncloud/core/issues/36741
4+ https://github.com/owncloud/core/pull/36778
You can’t perform that action at this time.
0 commit comments