mirror of
https://github.com/nextcloud/server.git
synced 2026-04-28 01:28:08 -04:00
test(View): Copy preserves content
Signed-off-by: Louis Chemineau <louis@chmn.me>
This commit is contained in:
parent
a663b3e0cd
commit
b1cbeff17c
1 changed files with 8 additions and 0 deletions
|
|
@ -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'));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue