ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Sabre\DAV\PropertyStorage\PluginTest Class Reference
+ Inheritance diagram for Sabre\DAV\PropertyStorage\PluginTest:
+ Collaboration diagram for Sabre\DAV\PropertyStorage\PluginTest:

Public Member Functions

 setUp ()
 
 testGetInfo ()
 
 testSetProperty ()
 
 testGetProperty ()
 testSetProperty More...
 
 testDeleteProperty ()
 testSetProperty More...
 
 testMove ()
 
 testSetPropertyInFilteredPath ()
 testDeleteProperty More...
 
 testGetPropertyInFilteredPath ()
 testSetPropertyInFilteredPath More...
 
- Public Member Functions inherited from Sabre\DAVServerTest
 setUp ()
 
 initializeEverything ()
 
 request ($request, $expectedStatus=null)
 Makes a request, and returns a response object. More...
 
 autoLogin ($userName)
 This function takes a username and sets the server in a state where this user is logged in, and no longer requires an authentication check. More...
 
 setUpTree ()
 Override this to provide your own Tree for your test-case. More...
 
 setUpBackends ()
 
 assertHttpStatus ($expectedStatus, HTTP\Request $req)
 

Protected Attributes

 $backend
 
 $plugin
 
 $setupFiles = true
 
- Protected Attributes inherited from Sabre\DAVServerTest
 $setupCalDAV = false
 
 $setupCardDAV = false
 
 $setupACL = false
 
 $setupCalDAVSharing = false
 
 $setupCalDAVScheduling = false
 
 $setupCalDAVSubscriptions = false
 
 $setupCalDAVICSExport = false
 
 $setupLocks = false
 
 $setupFiles = false
 
 $setupSharing = false
 
 $setupPropertyStorage = false
 
 $caldavCalendars = []
 An array with calendars. More...
 
 $caldavCalendarObjects = []
 
 $carddavAddressBooks = []
 
 $carddavCards = []
 
 $server
 
 $tree = []
 
 $caldavBackend
 
 $carddavBackend
 
 $principalBackend
 
 $locksBackend
 
 $propertyStorageBackend
 
 $caldavPlugin
 
 $carddavPlugin
 
 $aclPlugin
 
 $caldavSharingPlugin
 
 $caldavSchedulePlugin
 
 $authPlugin
 
 $locksPlugin
 
 $sharingPlugin
 
 $propertyStoragePlugin
 
 $autoLogin = null
 If this string is set, we will automatically log in the user with this name. More...
 

Detailed Description

Definition at line 5 of file PluginTest.php.

Member Function Documentation

◆ setUp()

Sabre\DAV\PropertyStorage\PluginTest::setUp ( )

Definition at line 12 of file PluginTest.php.

12  {
13 
14  parent::setUp();
15  $this->backend = new Backend\Mock();
16  $this->plugin = new Plugin(
17  $this->backend
18  );
19 
20  $this->server->addPlugin($this->plugin);
21 
22  }

◆ testDeleteProperty()

Sabre\DAV\PropertyStorage\PluginTest::testDeleteProperty ( )

testSetProperty

Definition at line 61 of file PluginTest.php.

References Sabre\DAV\PropertyStorage\PluginTest\testSetProperty().

61  {
62 
63  $this->testSetProperty();
64  $this->server->emit('afterUnbind', ['']);
65  $this->assertEquals([], $this->backend->data);
66 
67  }
+ Here is the call graph for this function:

◆ testGetInfo()

Sabre\DAV\PropertyStorage\PluginTest::testGetInfo ( )

Definition at line 24 of file PluginTest.php.

24  {
25 
26  $this->assertArrayHasKey(
27  'name',
28  $this->plugin->getPluginInfo()
29  );
30 
31  }

◆ testGetProperty()

Sabre\DAV\PropertyStorage\PluginTest::testGetProperty ( )

testSetProperty

Definition at line 47 of file PluginTest.php.

References $result, and Sabre\DAV\PropertyStorage\PluginTest\testSetProperty().

47  {
48 
49  $this->testSetProperty();
50  $result = $this->server->getProperties('', ['{DAV:}displayname']);
51 
52  $this->assertEquals([
53  '{DAV:}displayname' => 'hi',
54  ], $result);
55 
56  }
$result
+ Here is the call graph for this function:

◆ testGetPropertyInFilteredPath()

Sabre\DAV\PropertyStorage\PluginTest::testGetPropertyInFilteredPath ( )

testSetPropertyInFilteredPath

Definition at line 109 of file PluginTest.php.

References $result, and Sabre\DAV\PropertyStorage\PluginTest\testSetPropertyInFilteredPath().

109  {
110 
112  $result = $this->server->getProperties('', ['{DAV:}displayname']);
113 
114  $this->assertEquals([], $result);
115  }
$result
testSetPropertyInFilteredPath()
testDeleteProperty
Definition: PluginTest.php:93
+ Here is the call graph for this function:

◆ testMove()

Sabre\DAV\PropertyStorage\PluginTest::testMove ( )

Definition at line 69 of file PluginTest.php.

References $request, and $result.

69  {
70 
71  $this->server->tree->getNodeForPath('files')->createFile('source');
72  $this->server->updateProperties('files/source', ['{DAV:}displayname' => 'hi']);
73 
74  $request = new \Sabre\HTTP\Request('MOVE', '/files/source', ['Destination' => '/files/dest']);
75  $this->assertHTTPStatus(201, $request);
76 
77  $result = $this->server->getProperties('/files/dest', ['{DAV:}displayname']);
78 
79  $this->assertEquals([
80  '{DAV:}displayname' => 'hi',
81  ], $result);
82 
83  $this->server->tree->getNodeForPath('files')->createFile('source');
84  $result = $this->server->getProperties('/files/source', ['{DAV:}displayname']);
85 
86  $this->assertEquals([], $result);
87 
88  }
$result
foreach($paths as $path) $request
Definition: asyncclient.php:32

◆ testSetProperty()

Sabre\DAV\PropertyStorage\PluginTest::testSetProperty ( )

Definition at line 33 of file PluginTest.php.

Referenced by Sabre\DAV\PropertyStorage\PluginTest\testDeleteProperty(), and Sabre\DAV\PropertyStorage\PluginTest\testGetProperty().

33  {
34 
35  $this->server->updateProperties('', ['{DAV:}displayname' => 'hi']);
36  $this->assertEquals([
37  '' => [
38  '{DAV:}displayname' => 'hi',
39  ]
40  ], $this->backend->data);
41 
42  }
+ Here is the caller graph for this function:

◆ testSetPropertyInFilteredPath()

Sabre\DAV\PropertyStorage\PluginTest::testSetPropertyInFilteredPath ( )

testDeleteProperty

Definition at line 93 of file PluginTest.php.

References $path.

Referenced by Sabre\DAV\PropertyStorage\PluginTest\testGetPropertyInFilteredPath().

93  {
94 
95  $this->plugin->pathFilter = function($path) {
96 
97  return false;
98 
99  };
100 
101  $this->server->updateProperties('', ['{DAV:}displayname' => 'hi']);
102  $this->assertEquals([], $this->backend->data);
103 
104  }
$path
Definition: aliased.php:25
+ Here is the caller graph for this function:

Field Documentation

◆ $backend

Sabre\DAV\PropertyStorage\PluginTest::$backend
protected

Definition at line 7 of file PluginTest.php.

◆ $plugin

Sabre\DAV\PropertyStorage\PluginTest::$plugin
protected

Definition at line 8 of file PluginTest.php.

◆ $setupFiles

Sabre\DAV\PropertyStorage\PluginTest::$setupFiles = true
protected

Definition at line 10 of file PluginTest.php.


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