File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
tests/lib/Files/ObjectStore Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -262,4 +262,17 @@ public function testCopyGrantsPermissions(): void {
262262 $ this ->assertTrue ($ cache ->inCache ('new.txt ' ));
263263 $ this ->assertEquals (\OCP \Constants::PERMISSION_ALL , $ instance ->getPermissions ('new.txt ' ));
264264 }
265+
266+ public function testCopyFolderSize (): void {
267+ $ cache = $ this ->instance ->getCache ();
268+
269+ $ this ->instance ->mkdir ('source ' );
270+ $ this ->instance ->file_put_contents ('source/test.txt ' , 'foo ' );
271+ $ this ->instance ->getUpdater ()->update ('source/test.txt ' );
272+ $ this ->assertEquals (3 , $ cache ->get ('source ' )->getSize ());
273+
274+ $ this ->assertTrue ($ this ->instance ->copy ('source ' , 'target ' ));
275+
276+ $ this ->assertEquals (3 , $ cache ->get ('target ' )->getSize ());
277+ }
265278}
You can’t perform that action at this time.
0 commit comments