3declare(strict_types=1);
21use PHPUnit\Framework\TestCase;
22use Sabre\DAV\Exception\Forbidden;
24require_once
"./Services/WebDAV/test/ilWebDAVTestHelper.php";
33 $this->assertEquals($webdav_test_helper->getClientId(), $dav_client->getName());
331 $dav_client->setName(
'My Valid Name');
332 $this->assertFalse(
'This should not happen!');
333 }
catch (Forbidden
$e) {
334 $this->assertEquals(
'It is not possible to change the name of this node.',
$e->getMessage());
343 $dav_client->createFile(
'My New File.txt');
344 $this->assertFalse(
'This should not happen!');
345 }
catch (Forbidden
$e) {
346 $this->assertEquals(
'It is not possible to create a file here.',
$e->getMessage());
355 $dav_client->createDirectory(
'My New Folder');
356 $this->assertFalse(
'This should not happen!');
357 }
catch (Forbidden
$e) {
358 $this->assertEquals(
'It is not possible to create a directory here.',
$e->getMessage());
367 $dav_client->delete();
368 $this->assertFalse(
'This should not happen!');
369 }
catch (Forbidden
$e) {
370 $this->assertEquals(
'It is not possible to delete this node.',
$e->getMessage());
377 return new ilDAVClientNode($webdav_test_helper->getClientId(), $this->createStub(ilWebDAVObjFactory::class), $this->createStub(ilWebDAVRepositoryHelper::class));
testCreateDirectoryThrowsForbiddenError()
testDeleteThrowsForbiddenError()
testCreateFileThrowsForbiddenError()
testSetNameThrowsForbiddenError()
testGetNameGetsObjectTitle()
getDAVClientNodeWithExpectationForFunctions()
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...