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 @@ -275,4 +275,17 @@ public function testCopyGrantsPermissions() {
275275 $ this ->assertTrue ($ cache ->inCache ('new.txt ' ));
276276 $ this ->assertEquals (\OCP \Constants::PERMISSION_ALL , $ instance ->getPermissions ('new.txt ' ));
277277 }
278+
279+ public function testCopyFolderSize (): void {
280+ $ cache = $ this ->instance ->getCache ();
281+
282+ $ this ->instance ->mkdir ('source ' );
283+ $ this ->instance ->file_put_contents ('source/test.txt ' , 'foo ' );
284+ $ this ->instance ->getUpdater ()->update ('source/test.txt ' );
285+ $ this ->assertEquals (3 , $ cache ->get ('source ' )->getSize ());
286+
287+ $ this ->assertTrue ($ this ->instance ->copy ('source ' , 'target ' ));
288+
289+ $ this ->assertEquals (3 , $ cache ->get ('target ' )->getSize ());
290+ }
278291}
You can’t perform that action at this time.
0 commit comments