diff options
author | Julius Härtl <jus@bitgrid.net> | 2021-01-05 15:49:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-05 15:49:16 +0100 |
commit | 9b9c1aa7fd643747cd423d40c9c82ffa74e9e452 (patch) | |
tree | d9161c2b2f176de5125efeb4a74a6ee4f3378754 /tests/lib/Files/ViewTest.php | |
parent | 50b380e85b46f37de3612e4aa077726e8da94d01 (diff) | |
parent | 98560c80ea18df3629f374caa036221dadcb25f2 (diff) | |
download | nextcloud-server-9b9c1aa7fd643747cd423d40c9c82ffa74e9e452.tar.gz nextcloud-server-9b9c1aa7fd643747cd423d40c9c82ffa74e9e452.zip |
Merge pull request #24961 from nextcloud/bugfix/noid/copy-tests
Diffstat (limited to 'tests/lib/Files/ViewTest.php')
-rw-r--r-- | tests/lib/Files/ViewTest.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/lib/Files/ViewTest.php b/tests/lib/Files/ViewTest.php index f18af484f87..eed8bca957f 100644 --- a/tests/lib/Files/ViewTest.php +++ b/tests/lib/Files/ViewTest.php @@ -17,6 +17,7 @@ use OC\Files\View; use OCP\Constants; use OCP\Files\Config\IMountProvider; use OCP\Files\FileInfo; +use OCP\Files\GenericFileException; use OCP\Files\Storage\IStorage; use OCP\Lock\ILockingProvider; use OCP\Lock\LockedException; @@ -1163,11 +1164,11 @@ class ViewTest extends \Test\TestCase { /** @var \PHPUnit\Framework\MockObject\MockObject|Temporary $storage2 */ $storage2 = $this->getMockBuilder(TemporaryNoCross::class) ->setConstructorArgs([[]]) - ->setMethods(['fopen']) + ->setMethods(['fopen', 'writeStream']) ->getMock(); $storage2->method('writeStream') - ->willReturn(0); + ->willThrowException(new GenericFileException("Failed to copy stream")); $storage1->mkdir('sub'); $storage1->file_put_contents('foo.txt', '0123456789ABCDEFGH'); |