diff options
Diffstat (limited to 'apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php')
-rw-r--r-- | apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php index 564059cd1dc..45c11d0011a 100644 --- a/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php @@ -97,7 +97,7 @@ class FilesPluginTest extends TestCase { */ private $previewManager; - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $this->server = $this->getMockBuilder(Server::class) ->disableOriginalConstructor() @@ -462,10 +462,11 @@ class FilesPluginTest extends TestCase { * FolderA is an incoming shared folder and there are no delete permissions. * Thus moving /FolderA/test.txt to /test.txt should fail already on that check * - * @expectedException \Sabre\DAV\Exception\Forbidden - * @expectedExceptionMessage FolderA/test.txt cannot be deleted */ public function testMoveSrcNotDeletable() { + $this->expectException(\Sabre\DAV\Exception\Forbidden::class); + $this->expectExceptionMessage('FolderA/test.txt cannot be deleted'); + $fileInfoFolderATestTXT = $this->getMockBuilder(FileInfo::class) ->disableOriginalConstructor() ->getMock(); @@ -507,11 +508,11 @@ class FilesPluginTest extends TestCase { $this->plugin->checkMove('FolderA/test.txt', 'test.txt'); } - /** - * @expectedException \Sabre\DAV\Exception\NotFound - * @expectedExceptionMessage FolderA/test.txt does not exist - */ + public function testMoveSrcNotExist() { + $this->expectException(\Sabre\DAV\Exception\NotFound::class); + $this->expectExceptionMessage('FolderA/test.txt does not exist'); + $node = $this->getMockBuilder(Node::class) ->disableOriginalConstructor() ->getMock(); |