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:37:04 +0000 |
commit | 85417b56bf2bff3c892be6e227f8b07cf49a65a6 (patch) | |
tree | dafcce542ee60c80823456b60c9e9020a9583ebc | |
parent | ef4281ebe34692cacf78be92225dd46198c7ebbc (diff) | |
download | nextcloud-server-85417b56bf2bff3c892be6e227f8b07cf49a65a6.tar.gz nextcloud-server-85417b56bf2bff3c892be6e227f8b07cf49a65a6.zip |
test(View): Copy preserves contentbackport/48651/stable29
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 e59792956b2..d5c1404451d 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')); + } } |