diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2017-09-13 13:12:16 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2017-09-13 19:28:38 +0200 |
commit | ab63c89ab37611a306c12ba9020bda8ee8036460 (patch) | |
tree | a855eb24d3c47e0dabc6ed83bcad4fe6992202cb /apps/dav/tests | |
parent | d659199ff5eb3aeae66155c9f151ffd81c697cd3 (diff) | |
download | nextcloud-server-ab63c89ab37611a306c12ba9020bda8ee8036460.tar.gz nextcloud-server-ab63c89ab37611a306c12ba9020bda8ee8036460.zip |
Fix quota calculation on new dav upload endpoint
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/dav/tests')
-rw-r--r-- | apps/dav/tests/unit/Connector/Sabre/QuotaPluginTest.php | 11 |
1 files changed, 8 insertions, 3 deletions
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; } - } |