]> source.dussan.org Git - nextcloud-server.git/commitdiff
update dav tests
authorRobin Appelman <robin@icewind.nl>
Wed, 31 Oct 2018 15:31:42 +0000 (16:31 +0100)
committerRobin Appelman <robin@icewind.nl>
Wed, 31 Oct 2018 20:10:54 +0000 (21:10 +0100)
Signed-off-by: Robin Appelman <robin@icewind.nl>
apps/dav/tests/unit/Connector/Sabre/FileTest.php

index 5e7a637420632230ae8730e4a5614ef7599f2578..edb61edc6ed929a5b275015acbcda852ebebeadc 100644 (file)
@@ -164,7 +164,7 @@ class FileTest extends \Test\TestCase {
        public function testSimplePutFails($thrownException, $expectedException, $checkPreviousClass = true) {
                // setup
                $storage = $this->getMockBuilder(Local::class)
-                       ->setMethods(['fopen'])
+                       ->setMethods(['writeStream'])
                        ->setConstructorArgs([['datadir' => \OC::$server->getTempManager()->getTemporaryFolder()]])
                        ->getMock();
                \OC\Files\Filesystem::mount($storage, [], $this->user . '/');
@@ -182,11 +182,11 @@ class FileTest extends \Test\TestCase {
 
                if ($thrownException !== null) {
                        $storage->expects($this->once())
-                               ->method('fopen')
+                               ->method('writeStream')
                                ->will($this->throwException($thrownException));
                } else {
                        $storage->expects($this->once())
-                               ->method('fopen')
+                               ->method('writeStream')
                                ->will($this->returnValue(false));
                }