From ab63c89ab37611a306c12ba9020bda8ee8036460 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Wed, 13 Sep 2017 13:12:16 +0200 Subject: Fix quota calculation on new dav upload endpoint Signed-off-by: Roeland Jago Douma --- apps/dav/tests/unit/Connector/Sabre/QuotaPluginTest.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'apps/dav/tests/unit') diff --git a/apps/dav/tests/unit/Connector/Sabre/QuotaPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/QuotaPluginTest.php index 6286362f47d..d29080539e6 100644 --- a/apps/dav/tests/unit/Connector/Sabre/QuotaPluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/QuotaPluginTest.php @@ -24,7 +24,13 @@ * */ namespace OCA\DAV\Tests\unit\Connector\Sabre; +use OC\Files\View; +use OCA\DAV\Connector\Sabre\Directory; +use OCA\DAV\Connector\Sabre\QuotaPlugin; +use OCA\DAV\Files\FilesHome; use OCP\Files\FileInfo; +use Sabre\DAV\Exception\InsufficientStorage; +use Sabre\DAV\Tree; use Test\TestCase; /** @@ -44,7 +50,7 @@ class QuotaPluginTest extends TestCase { private function init($quota, $checkedPath = '') { $view = $this->buildFileViewMock($quota, $checkedPath); $this->server = new \Sabre\DAV\Server(); - $this->plugin = $this->getMockBuilder('\OCA\DAV\Connector\Sabre\QuotaPlugin') + $this->plugin = $this->getMockBuilder(QuotaPlugin::class) ->setConstructorArgs([$view]) ->setMethods(['getFileChunking']) ->getMock(); @@ -224,7 +230,7 @@ class QuotaPluginTest extends TestCase { private function buildFileViewMock($quota, $checkedPath) { // mock filesysten - $view = $this->getMockBuilder('\OC\Files\View') + $view = $this->getMockBuilder(View::class) ->setMethods(['free_space']) ->disableOriginalConstructor() ->getMock(); @@ -235,5 +241,4 @@ class QuotaPluginTest extends TestCase { return $view; } - } -- cgit v1.2.3