diff options
author | Robin Appelman <robin@icewind.nl> | 2020-06-30 16:09:50 +0200 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2020-07-31 17:33:03 +0200 |
commit | e860507201dc68260dc8633046ab053a93586146 (patch) | |
tree | a4bd027b2ea2407e05de748181ec7dd2a44edee9 /tests | |
parent | 7e12f9c9bb757fa71abd216b21223cc738b8acc2 (diff) | |
download | nextcloud-server-e860507201dc68260dc8633046ab053a93586146.tar.gz nextcloud-server-e860507201dc68260dc8633046ab053a93586146.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 | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/tests/lib/Files/ViewTest.php b/tests/lib/Files/ViewTest.php index 57050059375..e394e0a8651 100644 --- a/tests/lib/Files/ViewTest.php +++ b/tests/lib/Files/ViewTest.php @@ -242,7 +242,7 @@ class ViewTest extends \Test\TestCase { $this->assertEquals('/foo.txt', $folderView->getPath($id2)); } - + public function testGetPathNotExisting() { $this->expectException(\OCP\Files\NotFoundException::class); @@ -1167,13 +1167,8 @@ class ViewTest extends \Test\TestCase { ->setMethods(['fopen']) ->getMock(); - $storage2->expects($this->any()) - ->method('fopen') - ->will($this->returnCallback(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'); @@ -1291,7 +1286,7 @@ class ViewTest extends \Test\TestCase { $this->assertNull($view->getRelativePath(null)); } - + public function testNullAsRoot() { $this->expectException(\InvalidArgumentException::class); |