update dav tests

Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
Robin Appelman 2018-10-31 16:31:42 +01:00
parent c6a48110bf
commit 4094a5e74a
No known key found for this signature in database
GPG key ID: 42B69D8A64526EFB

View 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));
}