diff options
author | Robin Appelman <robin@icewind.nl> | 2020-06-30 16:09:50 +0200 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2020-07-23 21:01:23 +0000 |
commit | b6a600e6535fb972e1e4c5c33dd6bd5cf7a097c2 (patch) | |
tree | 2feb82f6858a52afbb4f403b78333282d1d58db1 /tests | |
parent | c567b1d6b221ea5ffd48c88b17e404d85f2bb19a (diff) | |
download | nextcloud-server-b6a600e6535fb972e1e4c5c33dd6bd5cf7a097c2.tar.gz nextcloud-server-b6a600e6535fb972e1e4c5c33dd6bd5cf7a097c2.zip |
rollback cache rename if trashbin move fails
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/Files/ViewTest.php | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/tests/lib/Files/ViewTest.php b/tests/lib/Files/ViewTest.php index 9dbe2a4e10e..acaa5fc98b2 100644 --- a/tests/lib/Files/ViewTest.php +++ b/tests/lib/Files/ViewTest.php @@ -1167,13 +1167,8 @@ class ViewTest extends \Test\TestCase { ->setMethods(['fopen']) ->getMock(); - $storage2->expects($this->any()) - ->method('fopen') - ->willReturnCallback(function ($path, $mode) use ($storage2) { - /** @var \PHPUnit_Framework_MockObject_MockObject | \OC\Files\Storage\Temporary $storage2 */ - $source = fopen($storage2->getSourcePath($path), $mode); - return Quota::wrap($source, 9); - }); + $storage2->method('writeStream') + ->willReturn(0); $storage1->mkdir('sub'); $storage1->file_put_contents('foo.txt', '0123456789ABCDEFGH'); |