diff options
author | Louis Chemineau <louis@chmn.me> | 2024-12-03 18:29:32 +0100 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2025-02-13 23:35:59 +0000 |
commit | b1cbeff17cc366d1994f780738d0bfd2f771fc83 (patch) | |
tree | 32f4f012c2de7122ac55021b8835ec0c752aae24 | |
parent | a663b3e0cd1122b920f837c096c37c10cc82c05e (diff) | |
download | nextcloud-server-b1cbeff17cc366d1994f780738d0bfd2f771fc83.tar.gz nextcloud-server-b1cbeff17cc366d1994f780738d0bfd2f771fc83.zip |
test(View): Copy preserves contentbackport/48651/stable30
Signed-off-by: Louis Chemineau <louis@chmn.me>
-rw-r--r-- | tests/lib/Files/ViewTest.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/lib/Files/ViewTest.php b/tests/lib/Files/ViewTest.php index c5b91b837d9..b233fc90966 100644 --- a/tests/lib/Files/ViewTest.php +++ b/tests/lib/Files/ViewTest.php @@ -2816,4 +2816,12 @@ class ViewTest extends \Test\TestCase { $this->assertEquals('foo.png', $folderData[1]['name']); $this->assertEquals('foo.txt', $folderData[2]['name']); } + + public function testCopyPreservesContent() { + $viewUser1 = new View('/' . 'userId' . '/files'); + $viewUser1->mkdir(''); + $viewUser1->file_put_contents('foo.txt', 'foo'); + $viewUser1->copy('foo.txt', 'bar.txt'); + $this->assertEquals('foo', $viewUser1->file_get_contents('bar.txt')); + } } |