diff options
author | Julius Härtl <jus@bitgrid.net> | 2021-01-05 09:12:11 +0100 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2021-01-05 09:20:35 +0100 |
commit | 98560c80ea18df3629f374caa036221dadcb25f2 (patch) | |
tree | 700c8d31504595c28bd3eae1c7344d17d8ee6d01 /tests | |
parent | ee842f1c43d2d004d2639382fe0a7ba08f3d06cb (diff) | |
download | nextcloud-server-98560c80ea18df3629f374caa036221dadcb25f2.tar.gz nextcloud-server-98560c80ea18df3629f374caa036221dadcb25f2.zip |
Properly handle result when copying with failure and throw in tests
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/Files/ViewTest.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/lib/Files/ViewTest.php b/tests/lib/Files/ViewTest.php index 90decd20a99..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; @@ -1167,7 +1168,7 @@ class ViewTest extends \Test\TestCase { ->getMock(); $storage2->method('writeStream') - ->willReturn(0); + ->willThrowException(new GenericFileException("Failed to copy stream")); $storage1->mkdir('sub'); $storage1->file_put_contents('foo.txt', '0123456789ABCDEFGH'); |