ILIAS  release_8 Revision v8.24
ilDAVClientNodeTest Class Reference
+ Inheritance diagram for ilDAVClientNodeTest:
+ Collaboration diagram for ilDAVClientNodeTest:

Public Member Functions

 testGetNameGetsObjectTitle ()
 
 testSetNameThrowsForbiddenError ()
 
 testCreateFileThrowsForbiddenError ()
 
 testCreateDirectoryThrowsForbiddenError ()
 
 testDeleteThrowsForbiddenError ()
 

Protected Member Functions

 getDAVClientNodeWithExpectationForFunctions ()
 

Detailed Description

Definition at line 26 of file class.ilDAVClientNodeTest.php.

Member Function Documentation

◆ getDAVClientNodeWithExpectationForFunctions()

ilDAVClientNodeTest::getDAVClientNodeWithExpectationForFunctions ( )
protected

Definition at line 374 of file class.ilDAVClientNodeTest.php.

376 $webdav_test_helper = new ilWebDAVTestHelper();
377 return new ilDAVClientNode($webdav_test_helper->getClientId(), $this->createStub(ilWebDAVObjFactory::class), $this->createStub(ilWebDAVRepositoryHelper::class));
378 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

Referenced by testCreateDirectoryThrowsForbiddenError(), testCreateFileThrowsForbiddenError(), testDeleteThrowsForbiddenError(), testGetNameGetsObjectTitle(), and testSetNameThrowsForbiddenError().

+ Here is the caller graph for this function:

◆ testCreateDirectoryThrowsForbiddenError()

ilDAVClientNodeTest::testCreateDirectoryThrowsForbiddenError ( )

Definition at line 350 of file class.ilDAVClientNodeTest.php.

350 : void
351 {
352 $dav_client = $this->getDAVClientNodeWithExpectationForFunctions();
353
354 try {
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());
359 }
360 }

References Vendor\Package\$e, and getDAVClientNodeWithExpectationForFunctions().

+ Here is the call graph for this function:

◆ testCreateFileThrowsForbiddenError()

ilDAVClientNodeTest::testCreateFileThrowsForbiddenError ( )

Definition at line 338 of file class.ilDAVClientNodeTest.php.

338 : void
339 {
340 $dav_client = $this->getDAVClientNodeWithExpectationForFunctions();
341
342 try {
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());
347 }
348 }

References Vendor\Package\$e, and getDAVClientNodeWithExpectationForFunctions().

+ Here is the call graph for this function:

◆ testDeleteThrowsForbiddenError()

ilDAVClientNodeTest::testDeleteThrowsForbiddenError ( )

Definition at line 362 of file class.ilDAVClientNodeTest.php.

362 : void
363 {
364 $dav_client = $this->getDAVClientNodeWithExpectationForFunctions();
365
366 try {
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());
371 }
372 }

References Vendor\Package\$e, and getDAVClientNodeWithExpectationForFunctions().

+ Here is the call graph for this function:

◆ testGetNameGetsObjectTitle()

ilDAVClientNodeTest::testGetNameGetsObjectTitle ( )

Definition at line 28 of file class.ilDAVClientNodeTest.php.

28 : void
29 {
30 $webdav_test_helper = new ilWebDAVTestHelper();
32
33 $this->assertEquals($webdav_test_helper->getClientId(), $dav_client->getName());
34 }

References getDAVClientNodeWithExpectationForFunctions().

+ Here is the call graph for this function:

◆ testSetNameThrowsForbiddenError()

ilDAVClientNodeTest::testSetNameThrowsForbiddenError ( )

Definition at line 326 of file class.ilDAVClientNodeTest.php.

326 : void
327 {
328 $dav_client = $this->getDAVClientNodeWithExpectationForFunctions();
329
330 try {
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());
335 }
336 }

References Vendor\Package\$e, and getDAVClientNodeWithExpectationForFunctions().

+ Here is the call graph for this function:

The documentation for this class was generated from the following file: