diff options
Diffstat (limited to 'apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php')
-rw-r--r-- | apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php index 3372f99e957..800bdfd3598 100644 --- a/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php @@ -43,8 +43,6 @@ use Sabre\DAV\Tree; use Sabre\HTTP\RequestInterface; use Sabre\HTTP\ResponseInterface; use Test\TestCase; -use OCA\DAV\Upload\FutureFile; -use OCA\DAV\Connector\Sabre\Directory; use OCP\Files\FileInfo; /** @@ -600,59 +598,4 @@ class FilesPluginTest extends TestCase { $this->assertEquals("false", $propFind->get(self::HAS_PREVIEW_PROPERTYNAME)); } - - public function testBeforeMoveFutureFileSkip() { - $node = $this->createMock(Directory::class); - - $this->tree->expects($this->any()) - ->method('getNodeForPath') - ->with('source') - ->will($this->returnValue($node)); - $this->server->httpResponse->expects($this->never()) - ->method('setStatus'); - - $this->assertNull($this->plugin->beforeMoveFutureFile('source', 'target')); - } - - public function testBeforeMoveFutureFileSkipNonExisting() { - $sourceNode = $this->createMock(FutureFile::class); - - $this->tree->expects($this->any()) - ->method('getNodeForPath') - ->with('source') - ->will($this->returnValue($sourceNode)); - $this->tree->expects($this->any()) - ->method('nodeExists') - ->with('target') - ->will($this->returnValue(false)); - $this->server->httpResponse->expects($this->never()) - ->method('setStatus'); - - $this->assertNull($this->plugin->beforeMoveFutureFile('source', 'target')); - } - - public function testBeforeMoveFutureFileMoveIt() { - $sourceNode = $this->createMock(FutureFile::class); - - $this->tree->expects($this->any()) - ->method('getNodeForPath') - ->with('source') - ->will($this->returnValue($sourceNode)); - $this->tree->expects($this->any()) - ->method('nodeExists') - ->with('target') - ->will($this->returnValue(true)); - $this->tree->expects($this->once()) - ->method('move') - ->with('source', 'target'); - - $this->server->httpResponse->expects($this->once()) - ->method('setHeader') - ->with('Content-Length', '0'); - $this->server->httpResponse->expects($this->once()) - ->method('setStatus') - ->with(204); - - $this->assertFalse($this->plugin->beforeMoveFutureFile('source', 'target')); - } } |