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 @@ -263,4 +263,17 @@ public function testCopyGrantsPermissions() {
263263 $ this ->assertTrue ($ cache ->inCache ('new.txt ' ));
264264 $ this ->assertEquals (\OCP \Constants::PERMISSION_ALL , $ instance ->getPermissions ('new.txt ' ));
265265 }
266+
267+ public function testCopyFolderSize (): void {
268+ $ cache = $ this ->instance ->getCache ();
269+
270+ $ this ->instance ->mkdir ('source ' );
271+ $ this ->instance ->file_put_contents ('source/test.txt ' , 'foo ' );
272+ $ this ->instance ->getUpdater ()->update ('source/test.txt ' );
273+ $ this ->assertEquals (3 , $ cache ->get ('source ' )->getSize ());
274+
275+ $ this ->assertTrue ($ this ->instance ->copy ('source ' , 'target ' ));
276+
277+ $ this ->assertEquals (3 , $ cache ->get ('target ' )->getSize ());
278+ }
266279}
You can’t perform that action at this time.
0 commit comments