use OC\Files\Storage\Wrapper\Quota;
use OCA\DAV\Connector\Sabre\Directory;
use OCP\Files\ForbiddenException;
+use OCP\Files\Mount\IMountPoint;
class TestViewDirectory extends \OC\Files\View {
private $updatables;
}
public function testGetQuotaInfoUnlimited() {
+ $mountPoint = $this->createMock(IMountPoint::class);
$storage = $this->getMockBuilder(Quota::class)
->disableOriginalConstructor()
->getMock();
+ $mountPoint->method('getStorage')
+ ->willReturn($storage);
$storage->expects($this->any())
->method('instanceOfStorage')
->willReturn(200);
$this->info->expects($this->once())
- ->method('getStorage')
- ->willReturn($storage);
+ ->method('getMountPoint')
+ ->willReturn($mountPoint);
$this->view->expects($this->once())
->method('getFileInfo')
}
public function testGetQuotaInfoSpecific() {
+ $mountPoint = $this->createMock(IMountPoint::class);
$storage = $this->getMockBuilder(Quota::class)
->disableOriginalConstructor()
->getMock();
+ $mountPoint->method('getStorage')
+ ->willReturn($storage);
$storage->expects($this->any())
->method('instanceOfStorage')
->willReturn(200);
$this->info->expects($this->once())
- ->method('getStorage')
- ->willReturn($storage);
+ ->method('getMountPoint')
+ ->willReturn($mountPoint);
$this->view->expects($this->once())
->method('getFileInfo')