Skip to content

Commit

Permalink
test(View): Copy preserves content
Browse files Browse the repository at this point in the history
Signed-off-by: Louis Chemineau <[email protected]>
  • Loading branch information
artonge authored and backportbot[bot] committed Feb 13, 2025
1 parent a663b3e commit b1cbeff
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/lib/Files/ViewTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2816,4 +2816,12 @@ public function testMountpointParentsCreated() {
$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'));
}
}

0 comments on commit b1cbeff

Please sign in to comment.