ILIAS  trunk Revision v11.0_alpha-1715-g7fc467680fb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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 24 of file ilDAVClientNodeTest.php.

Member Function Documentation

◆ getDAVClientNodeWithExpectationForFunctions()

ilDAVClientNodeTest::getDAVClientNodeWithExpectationForFunctions ( )
protected

Definition at line 372 of file ilDAVClientNodeTest.php.

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

373  {
374  $webdav_test_helper = new ilWebDAVTestHelper();
375  return new ilDAVClientNode(
376  $webdav_test_helper->getClientId(),
377  $this->createStub(ilWebDAVObjFactory::class),
378  $this->createStub(ilWebDAVRepositoryHelper::class)
379  );
380  }
+ Here is the caller graph for this function:

◆ testCreateDirectoryThrowsForbiddenError()

ilDAVClientNodeTest::testCreateDirectoryThrowsForbiddenError ( )

Definition at line 348 of file ilDAVClientNodeTest.php.

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

348  : void
349  {
350  $dav_client = $this->getDAVClientNodeWithExpectationForFunctions();
351 
352  try {
353  $dav_client->createDirectory('My New Folder');
354  $this->assertFalse('This should not happen!');
355  } catch (Forbidden $e) {
356  $this->assertEquals('It is not possible to create a directory here', $e->getMessage());
357  }
358  }
+ Here is the call graph for this function:

◆ testCreateFileThrowsForbiddenError()

ilDAVClientNodeTest::testCreateFileThrowsForbiddenError ( )

Definition at line 336 of file ilDAVClientNodeTest.php.

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

336  : void
337  {
338  $dav_client = $this->getDAVClientNodeWithExpectationForFunctions();
339 
340  try {
341  $dav_client->createFile('My New File.txt');
342  $this->assertFalse('This should not happen!');
343  } catch (Forbidden $e) {
344  $this->assertEquals('It is not possible to create a file here', $e->getMessage());
345  }
346  }
+ Here is the call graph for this function:

◆ testDeleteThrowsForbiddenError()

ilDAVClientNodeTest::testDeleteThrowsForbiddenError ( )

Definition at line 360 of file ilDAVClientNodeTest.php.

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

360  : void
361  {
362  $dav_client = $this->getDAVClientNodeWithExpectationForFunctions();
363 
364  try {
365  $dav_client->delete();
366  $this->assertFalse('This should not happen!');
367  } catch (Forbidden $e) {
368  $this->assertEquals('It is not possible to delete the root', $e->getMessage());
369  }
370  }
+ Here is the call graph for this function:

◆ testGetNameGetsObjectTitle()

ilDAVClientNodeTest::testGetNameGetsObjectTitle ( )

Definition at line 26 of file ilDAVClientNodeTest.php.

References getDAVClientNodeWithExpectationForFunctions().

26  : void
27  {
28  $webdav_test_helper = new ilWebDAVTestHelper();
29  $dav_client = $this->getDAVClientNodeWithExpectationForFunctions();
30 
31  $this->assertEquals($webdav_test_helper->getClientId(), $dav_client->getName());
32  }
+ Here is the call graph for this function:

◆ testSetNameThrowsForbiddenError()

ilDAVClientNodeTest::testSetNameThrowsForbiddenError ( )

Definition at line 324 of file ilDAVClientNodeTest.php.

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

324  : void
325  {
326  $dav_client = $this->getDAVClientNodeWithExpectationForFunctions();
327 
328  try {
329  $dav_client->setName('My Valid Name');
330  $this->assertFalse('This should not happen!');
331  } catch (Forbidden $e) {
332  $this->assertEquals('It is not possible to change the name of the root', $e->getMessage());
333  }
334  }
+ Here is the call graph for this function:

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