public function testMoveSrcDeletable() { $fileInfoFolderATestTXT = $this->getMockBuilder('\\OCP\\Files\\FileInfo')->disableOriginalConstructor()->getMock(); $fileInfoFolderATestTXT->expects($this->once())->method('isDeletable')->willReturn(true); $this->view->expects($this->once())->method('getFileInfo')->with('FolderA/test.txt')->willReturn($fileInfoFolderATestTXT); $this->plugin->checkMove('FolderA/test.txt', 'test.txt'); }