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 . '/');
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));
}